Knowledge Base

Restore/Migrate VestaCP from Backup

This article will describe how to restore VestaCP backup to a new server. This is very useful when you want to restore lost data or migrate to a new server.
In this example, we will restore a file from external FTP server. If you already have the backup file located to your new server, just skip the transfer steps.
It is assumed that the backup and the restore (source and destination) servers are the same. In this case, we will work with CentOS 6

 

1. Log in to your server shell

2. Create a temp folder where you will be storing the backup file

3. Use the included ftp client in CentOS to connect to the external FTP where your backup is located

4. Don't forget to change to BINARY mode before you download the backup file as sometimes the file might be downloaded in ASCII mode and that would corrupt the backup file and make it useless. To change into BINARY mode, just execute "binary" when you are connected to the remote FTP

5. Move your VestaCP backup to the default backup directory of your server "/home/backup/"

6. Initiate the following command from your shell
"/usr/local/vesta/bin/v-restore-user admin backupfile.tar.gz"
Where "/usr/local/vesta/bin/v-restore-user" is the script to perform the restore, "admin" is the user under which you will be restoring on the new server and "backupfile.tar.gz" is the name of the backup file which you have downloaded previously

Please rate this article to help us improve our Knowledge Base.

2 13