Applicable to:
- SolusVM
Question
How to manually backup/restore OpenVZ container?
Answer
Backup:
Connect to the source server over SSH.
Create an archive of the VPS:
# vzdump --compress --dumpdir /home/backup VMID
- compress : It will compress the dump file (results in a .tgz).
-dumpdir specifies the directory in which the dump should be stored. If a dumpdir is not specified, the dump is stored in /vz/dump by default."
- VMID of VPS can be found in SolusVM Virtual Servers tab
Restore:
Restore the archive:
# vzdump --restore /home/backup/vzdump-VMID.tgz VMID
Backup:
To create a backup for such VPS use the following command:
# tar --numeric-owner --ignore-failed-read -pczf <PATH-TO-BACKUP.tgz> /vz/private/UUID /vz/root/UUID
here <PATH-TO-BACKUP.tgz> is the desired path to the backup file
and UUID is the UUID of the VPS( e.g. 'bf939bd5-6fc1-4748-b972-bb7fe4063590')
Restore:
# tar -xpf<PATH-TO-BACKUP.tgz>-C /restore
Copy private and root directories to the destination:
# cp -a /restore/vz/private/UUID/* /vz/private/UUID/
# cp -a /restore/vz/root/UUID/* /vz/root/UUID/
Comments
Please sign in to leave a comment.