4.14. VPS backups
General information
The VPS backup is an image of the state of the operating system installed on the server. Work with backups is performed in the section «VPS» in the tab «Backup ».
There are two types of backups:
- Automatic - created by the system automatically every 4 days. When creating a new copy, the old one is deleted, so for recovery always available only one most recent automatic copy.
- Manual — arebeingcreated user manually no more than 1 time per day.
Creature
Important points:
- Backup request impossible to cancel.
- You can create a backup only once a day.
Recovery
Attention!
Request to restore a backup can not be canceled.Important points:
- After plan change VPS Not recommended restore a backup that was created before it was modified.
- Restoring a backup always returns the root user password, which was installed at the time of its creation.
Download
Notes:
- The backup is downloaded as a system image. The format of the downloaded image depends on the type of virtualization used: for Xen -
img
, for KVM —qcow2
. - The downloaded copy cannot be downloaded back and restored.
Click «Download» next to the desired backup:
Working with the downloaded image
Notes:
- The commands from the instructions must be executed on a Linux system. On Windows, you can use WSL (Windows Subsystem for Linux).
- Images
qcow2
can be converted toraw
using the utilityqemu-img
, after which the converted image can be connected according to this instruction. - Instead
vps.img
substitute the name of your image or the absolute path to it. kpartx
,mount
andumount
must be run as root or usesudo
.
To access content downloaded his image is needed toplug on your system, create virtual block devices and mount the desired partition. After that, you can view and copy any files and directories from it. When the work is completed, the image can be disable.
Attaching an image
Viewing the list of partitions in an image:
fdisk -l vps.img
Viewing the list of virtual block devices that will be created in the system:
kpartx -l vps.img
Creating virtual block devices in the system:
kpartx -av vps.img
Mounting the desired partition:
mount -o loop /dev/mapper/loop0p3 /mnt/vps
In a team:
- Instead
loop0p3
substitute the device and partition number from the output of the previous command. /mnt/vps
— the directory where the contents of the partition will be mounted. Note If the directory does not exist, create it with the commandmkdir /mnt/vps
.
Obtaining information about images and devices
Correspondence of image files to virtual block devices in the system:
losetup --list
Unmounting an image
Unmount partition:
umount /mnt/vps
Removing a virtual block device from the system:
kpartx -d vps.img