Restore or Migrating VestaCP User Data Between Servers
I got the same issue. My VSP crushed and Fortunately, I have a backup of my content saved locally. Just restored my server to a previous snapshot and followed this tutorial from digital ocean.
VestaCP comes with some scripts to help back up and restore user data. We will migrate all users using these scripts.
On the server you are migrating from, use v-backup-users to backup all users:
v-backup-users
Note: If you get a command not found error when running the backup program, you may need to update your PATH by running:
export PATH=$PATH:/usr/local/vesta/bin
This is handled automatically if you log out and back in after installing VestaCP.
The command will output no status information. You can check for the resulting backup files in /backup:
ls /backup
Output
admin.2018-04-11_13-07-02.tar exampleuser.2018-04-11_13-07-02.tar
The above output shows two users backed up, admin and exampleuser. To transfer these files to your new server, we’ll use the scp utility. The following steps will work the same whether you have one backup file or multiple.
If you’re using password authentication on the new server, it’s easiest to transfer the files directly from the old server to the new, like so:
scp /backup/*
[email protected]:/backup/
This won’t easily work if you use SSH keys instead of passwords. In that case it’s easiest to download the files to your local machine, then upload them to the new server. We will create a temporary local directory to hold the files first. On your local command line, do the following:
mkdir /tmp/vesta-backups
scp
[email protected]:/backup/* /tmp/vesta-backups/
scp /tmp/vesta-backups/*
[email protected]:/backup/
Now, with the backup .tar files uploaded to the new server’s /backup directory, log back in to the new server and use the v-restore-user command to complete the process:
v-restore-user admin admin.2018-04-11_13-07-02.tar
Note that the v-restore-user command needs the filename of the .tar file, but not the full path to the file. It is assumed that the filename you provide is in the /backup directory.
The command will output a summary of the items it has restored. Repeat this command for each user you need to restore, replacing the username and .tar file name as need. Your migration is now complete.
From :
https://www.digitalocean.com/community/ ... -user-data