4.14. VPS backups

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.

Backups can be restore or download.

Important points:

  • Backup request impossible to cancel.
  • You can create a backup only once a day.

Specify the desired backup name and click «Create a »:

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.

Click «Reestablish » next to the desired backup:

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:

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 to rawusing the utility qemu-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 and umount must be run as root or use sudo.

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 command mkdir /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
Content