Sometimes while migrating a user to a new server in VestaCP, we may come across the message, "Error: backup admin.2021-02-13.tar doesn't exist".
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related VestaCP queries.
In this context, we shall look into method to fix this VestaCP error.
1. To begin, we make user backup on the old server. For example, here we use admin as the reference.
$ v-backup-user admin
2. Then we copy the tarball to the new server and place it in the /home/backup directory
$ scp /home/backup/admin.2021-01-14.tar new-server:/home/backup/
3. Finally, we restore backup on the new server
$ v-restore-user admin admin.2014-01-14.tar
In case we wish to restore data under another username, we simply rename the archive. If the username doesn't exist on the server, the account will create automatically:
$ mv /home/backup/admin.2021-01-14.tar /home/backup/newuser.2014-01-14.tar
$ v-restore-user newuser newuser.2014-01-14.tar
When we come across the error, first and foremost, we need to cross-check the permission of the "/home/backup" is under the ownership of the admin user.
We use the ls -al command to list the directory. Then we use the chown command to change the ownership:
$ ls -al /home/backup
$ chown admin:admin /home/backup
If the permission is intact, we need to verify if there is a symlink from /home/backup and /backup.
In case it is not, we run the command below:
$ ln -s /home/backup /backup
Once done, we need to ensure that the backup file exists in the /home/backup directory.
Suppose it is not, then we need to move the backup inside the /home/backup directory.
For instance, suppose the file is in the user home directory, then we use the command below to move the file:
$ mv /home/USERNAME/backup_file.tar /home/backup/
This article covers methods to resolve Error: "backup doesn't exist" in VestaCP which generally happens while migrating a user to a new server.