That may seem expensive, but it's far cheaper than getting that much server capacity at Rackspace. However, I don't need that much capacity. I can trade processor power for power savings, keep the disk space and RAID card, and switch to an Atom-based server. My current FreePBX Atom server runs at 40 watts with an analog card powering two FXS modules. I bet I can match that on a new server. I'd get the new Supermicro Atom Server, but it has space for only one 3.5 inch hard drive. I need two. Thus I'll be using another miniITX case. In the meantime, everything's running on another old Dell tower box.
How did I move it? First I though reinstalling all the software from scratch would be a good idea. I'd get a nice clean, efficient build. But that took way too long, and I'd have to re-customize my templates and tweaks. I had MySQL backups running for a while, why not start testing the restores? I used rsync:
rsync -avz /var/www/ -e ssh:user@mynewserver /var/www/
(Note: Please study rsync syntax. Those / at the ends make a big difference.)
It worked. Next I had to tweak the new httpd.conf file. I couldn't just copy the old one, because I was using the latest Apache version. But I could use almost all of the old file. I just needed to adjust the modules it loaded, because several have changed names.
Then I restored the databases:
mysql -u root -p
enter your password. (You ARE using a PW for MySQL root, aren't you?)
mysql> create database mynewdb
then
mysql> quit;
then
$ mysql -u root -p [mynewdb] < [backupfile.sql]
But that generally does not restore your user privs on the db. Back to mysql:
mysql -u root -p
then
mysql> use mynewdb;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'localhost'
IDENTIFIED BY 'pAssW0rd' WITH GRANT OPTION;
mysql> flush privileges;
Don't forget the above step or you'll need to restart MySQL to get it to work.
mysql> quit;
Then double check that the user and pass from above match your config files.
Finally, test your applications. Gallery2 and MovableType worked fine. Your milage may vary. My office is almost silent now.
No comments:
Post a Comment