How to backup SolusIO VPS manually?

Have more questions? Submit a request

Applicable to:

  • SolusIO


How to backup SolusIO VPS manually?


  1. Connect to Compute Resource via SSH
  2. Create the directories for snapshots and backups:

    # mkdir /home/snapshots && mkdir /home/backups

  3. Find the VPS image file path:

    # virsh domblklist UUID | grep sda | awk {'print $2'}

    Command example:

    # virsh domblklist 9a29b8b6-ded3-4a59-9381-8ab52b823dbf | grep sda | awk {'print $2'}
    # /var/lib/libvirt/images/409/f9616495b867f6b3c65fa7fb7b833128

    The VPS UUID that can be found on VPS page at SolusIO > Virtual Servers > VPS:

    Click to expand the image


  4. Freeze the VPS filesystem:

    # virsh domfsfreeze UUID

  5. Create the VPS snapshot:

    # virsh snapshot-create-as --domain UUID SNAPSHOT_NAME --diskspec sda,file=SNAPSHOT_PATH --disk-only --atomic

    Command example:

    # virsh snapshot-create-as --domain 9a29b8b6-ded3-4a59-9381-8ab52b823dbf vps_snap --diskspec sda,file=/home/snapshots/vps_snap.qcow2 --disk-only --atomic

  6. Unfreeze the VPS filesystem:

    # virsh domfsthaw UUID

  7. Create the main VPS image backup using the image path from step 2:

    # qemu-img convert -O qcow2 IMAGE_PATH BACKUP_FILE

    Command example:

    # qemu-img convert -O qcow2 /var/lib/libvirt/images/409/f9616495b867f6b3c65fa7fb7b833128 /home/backups/vps_back.qcow2

  8. After copying is finished merge changes written to snapshot, back to original disk image. This operation is called 'active block commit':

    # virsh blockcommit UUID hda --active --pivot --shallow --verbose

The VPS image backup will be stored in the file /home/backups/vps_back.qcow2 

Articles in this section

Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.