Move Linux sites from one server to another

Moving the files

1. First  log in as root to the source server

2.  tar -cvf   websitename.tar  websitedirectory/

3. Then FTP or sftp the files to the destination server

4.  Then tar -xvf website.tar  (destination server)


Moving the databases

1. Run this backup script or this other one to backup all databases or  simply use PhpMyadmin.

2. Then restore the mysqldump files to the destination database

mysql -h host – u username – p  databasename <  ycsoftware.sql


DNS Changes

Make sure you change your DNS settings (if necessary).

Also remember to migrate or recreate the email account on the new server

And Voila your site has been migrated.


Download the  Automysqlbackup below

http://sourceforge.net/projects/automysqlbackup/files/