Move to a new server

Hello,

I’m trying to move my data ( database + contents ) from the old server to a new one, what is the best way to transfer everything ? because my method is old, move site by site, and after move databases files to the new server and restore them on the new server to get them work fine. I don’t know if there is a way to do that by SSH, like move everything between 2 servers ( old and new ) by some SSH commands …maybe ?

Thanks in advance for your help.

Do you have CPanel? If you do, it has a button you click to do a full site backup. Then you can transfer the backup file to the new server via SSH and restore the site in a few clicks—database and all.

I’ve had to migrate hundreds of sites, and the way that we did them was to SSH to the old server, which had the database AND the web files on it. We would take a mysql dump of the database, rsync the files across to the new server (web and DB), reimport the MySQL dump data to the new database and you’re done. The beauty of rsync is that it’s incremental too, so you can copy it all over, make sure it’s working OK, then perform another rsync in case anything new was added to the site and you’re done. Only down side is that you can’t do an incremental update of the database itself so you do need to do a full import of that.

The actual process that I used was something like this:

  1. Disable old site if possible
  2. SSH in to old server
  3. Take a MySQL dump
  4. RSync all web and DB files to new server
  5. Import MySQL data
  6. Edit site config file to point to new database
  7. Test site
  8. If all is well edit the old site config to point to new database
  9. Enable new site
  10. Repoint DNS to new server

Think that was it