Applicable to:
- SolusIO
Question
How to backup SolusIO VPS manually?
Answer
- Connect to Compute Resource via SSH
- Create the directories for snapshots and backups:
# mkdir /home/snapshots && mkdir /home/backups
- 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/f9616495b867f6b3c65fa7fb7b833128The VPS UUID that can be found on VPS page at SolusIO > Virtual Servers > VPS:
Click to expand the image - Freeze the VPS filesystem:
# virsh domfsfreeze UUID
- 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
- Unfreeze the VPS filesystem:
# virsh domfsthaw UUID
- 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
- 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
Comments
0 commentsPlease sign in to leave a comment.