I’ve moved VestaCP installations so fast that by the time a customer started the checkout page in Sydney, they submitted their order to Amsterdam.
This is best achieved with Cloudflare as there will be absolutely no downtime, whatsoever.
First make sure there is a new VestaCP installation on your new server. If you have a busy website, having the new server ready to go will mean you will have less than 10 seconds of downtime.
Alternatively, you may be adding an old VestaCP installation to another VestaCP installation (maybe you realised how powerful & resource un-intensive VestaCP is, especially without exim + dovecot + spamassassin + clamav)
Will you be using admin as the account on the new server?
Create a fresh backup on the OLD SERVER
SSH into the server you want to close down and run
ssh root@old.server.ip
v-backup-user admin
When it’s done, you’ll see the backup timestamp and file size.
Note the DATE of the backup above.
Open a new terminal and SSH into the NEW SERVER that you want to move VestaCP to.
ssh root@new.server.ip
Run following command
scp -oStrictHostKeyChecking=no root@old.server.ip:/home/backup/admin.2016-10-30.tar /home/backup/
Input the password of the old server and it will securely copy the Old Vest to the New Vesta backup folder.
Once it’s downloaded, restore the user called admin
v-restore-user admin admin.2016-10-30.tar
Your New Server will have been migrated!
SUPER FAST VESTACP MIGRATION METHOD – MILLISECOND DOWNTIME
Open Cloudflare account that holds the website you are migrating.
Open two terminals
In Terminal 1 SSH into your Old Server.
In Terminal 2 SSH into your New Server.
Make sure VestaCP is installed on the New Server (Terminal 2).
In the Terminal 1 Old Server execute
date
Note down the date, for example, “Sun Oct 30 00:22:33 UTC 2016”.
Now in the same Terminal 1 Old Server type (but don’t press enter yet!)
v-backup-user admin
In Terminal 2 New Server type (but don’t press enter yet!) [replace old.server.ip with Old Server IP and replace the date in .tar file]
scp -oStrictHostKeyChecking=no root@old.server.ip:/home/backup/admin.2016-10-30.tar /home/backup/
Copy the root password the Old Server (Ctrl + C) to your clipboard
Ready?
Execute the “v-backup-user admin” command on the Terminal 1 Old Server
Wait a few seconds until the backup is done, or minutes if it’s a big website.
As soon as the backup is done, execute the scp “-oStrictHo….” on Terminal 2 New Server
Paste the password for the old server and the migration will begin.
admin.2016-10-29.tar 100% 15MB 14.8MB/s 00:01
As soon as it’s done, in the same Terminal (Terminal 2 New Server) execute:
v-restore-user admin admin.2016-10-30.tar
Wait a few seconds until the backup is restored, or minutes if it’s a big website.
Go back to Cloudflare and change the IP to the new server.
This will immediately migrate everything, with zero downtime.