Difference between revisions of "KVM: Create Live backups (snapshot-create-as, blockcommit)"
Jump to navigation
Jump to search
(Created page with "Live-disk-backup-with-active-blockcommit: https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit * Overview: <code>virsh/virsh snapshot-create-as|virsh snap...") |
|||
Line 1: | Line 1: | ||
Live-disk-backup-with-active-blockcommit: https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit | Live-disk-backup-with-active-blockcommit: https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit | ||
− | * Overview: <code>[[ | + | * Overview: <code>[[virsh snapshot-create-as]]</code> -> <code>[[virsh blockcommit]]</code> |
Line 7: | Line 7: | ||
1. Create an external disk snapshot, specify image destination : | 1. Create an external disk snapshot, specify image destination : | ||
− | <code>[[ | + | <code>[[virsh snapshot-create-as]] --domain VM_TO_BACKUP --diskspec vda,file=/export/images/VM_TO_BACKUP_overlay1.qcow2 --disk-only --atomic</code> |
:<code>--diskspec</code> To indicate '''external snapshot''' and location | :<code>--diskspec</code> To indicate '''external snapshot''' and location | ||
:<code>--disk-only</code> Do not save memory information | :<code>--disk-only</code> Do not save memory information | ||
Line 14: | Line 14: | ||
2. Take a backup of the '''original disk''': <code>cp</code> or <code>[[linux/Basic commands/rsync|rsync]]</code> | 2. Take a backup of the '''original disk''': <code>cp</code> or <code>[[linux/Basic commands/rsync|rsync]]</code> | ||
− | 3. <code>[[ | + | 3. <code>[[virsh blockcommit]] VM_TO_BACKUP DEVICE --active --verbose --pivot</code> |
− | :<code>[[ | + | :<code>[[virsh blockcommit]] VM_TO_BACKUP vda --active --verbose --pivot</code> |
Revision as of 13:40, 7 January 2020
Live-disk-backup-with-active-blockcommit: https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit
- Overview:
virsh snapshot-create-as
->virsh blockcommit
1. Create an external disk snapshot, specify image destination :
virsh snapshot-create-as --domain VM_TO_BACKUP --diskspec vda,file=/export/images/VM_TO_BACKUP_overlay1.qcow2 --disk-only --atomic
--diskspec
To indicate external snapshot and location--disk-only
Do not save memory information--atomic
2. Take a backup of the original disk: cp
or rsync
3. virsh blockcommit VM_TO_BACKUP DEVICE --active --verbose --pivot
virsh blockcommit VM_TO_BACKUP vda --active --verbose --pivot
Activities
- Review Bash script https://gist.github.com/cabal95/e36c06e716d3328b512b implementing Live Backup and https://gist.github.com/maxim-gorkin/f0e8a2c01a93ca65ad2ad10566a78d72 with logging capabilities, remote destination and rsync usage.
- Review bacula solution: http://www.bacula.lat/kvm-hot-online-virtual-machines-backup-with-bacula-bpipe/?lang=en
- Review Veritas Netbackup support for RHV
See also
Advertising: