GridVids
Sign in with YouTube

KVM | Backup a Guest Virtual Machine

Mark watched
Don't Miss
Hide
Open in popup Open on YouTube

Yogesh Mehta 8 years ago

As a system admin, taking backup is the one of critical task to ensure you have required data to restore the services incase recover from a disaster. To backup a KVM guest , follow the steps below

Power off the guest VM , if it is running. # virsh shutdown guest-vm

Note – You can take backups when guest is running, but it can lead to a unhealthy backup image.

Take backup of the disk-image file. (default path is : /var/lib/libvirt/images) # cp -p /var/lib/libvirt/images/ guest-vm-image /path/to/backup/location

3. Take Backupo of configuration file. # cp -p  /etc/libvirt/qemu/ guest-vm.xml /path/to/backup/location

If you have data which is not local , i.e. some NFS shares etc, take perform the backups as recommended by the vendor.

Watch the video for details :