ProWebUK said:
John, just wondering, if you backup up the whole directadmin area (/usr/local/directadmin) will account data be restored as you restored the data (are accounts and all info there, or a database elsewhere or...?)
Chris
I had to do this once before, when changing to a different server with a different IP address. I'm sure these instructions aren't complete, but it should at least help you get started.
First, I would update DA on the old server to the newest version. Also request that the license be changed over to the IP of the new server.
Next, backup these directories, I did it by going one level below the directory in question, then typing "tar czf directory.tar.gz directory". When you restore it, simply place the directory.tar.gz file one level below where it'll go (i.e. if the full path is /usr/local/directadmin/data, you want to put the data.tar.gz file in /usr/local/directadmin) and type "tar xzf directory.tar.gz".
/usr/local/directadmin/data
/etc/httpd/conf
/var/named
/home
/var/lib/mysql
/var/spool/mail
/var/spool/virtual
Also backup these files:
/etc/proftd.conf
/etc/proftpd.vhosts.conf
/etc/proftpd.passwd
/etc/passwd
/etc/shadow
Next, install DA on the new server. Make sure you specify the old MySQL password in the setup.txt file after it asks you the config questions (and before it's started the install).
Now stop the directadmin service (service directadmin stop). Restore the backups made above. I'd make a copy of the new server's /etc/passwd and /etc/shadow files before replacing them with the old server's copies. Also note that if you had a different root password on the new server, you will now have to use the root password of the old server next time you login.
Now, follow these instructions to change all the IPs over to what they should be:
http://www.directadmin.com/change_ip.txt
After you restart all the services, you should be in business. Since DNS changes take some time, here's a way to jumpstart the process and direct people to the new server right away. Go into your /var directory, and type "tar czf named.tar.gz named" to backup the named directory. Ftp this file to the old server and place it in the /var directory. Type "tar xzf named.tar.gz" to restore it. Restart named (service named restart). Now your old server will direct users to the new server. Just be sure to actually change the IPs for your nameservers with your domain registrar as you normally would.
Login to some of the accounts, make sure everything's working, websites are online, mail works, etc. Try to keep the old server around for at least several days (if not a week or longer) just in case you missed something.