On 11/20/2017 03:27 PM, Josip Deanovic wrote: > On Monday 2017-11-20 11:45:09 Bill Arlofski wrote: > [...] >> Using a Runscript (with RunsWhen=before), you can have small script to >> tell the KVM hypervisor to perform a snapshot of a particular VM. Then, >> once the snapshot is complete, the job would backup the VM's config and >> disks, then in a second RunScript in the same Job configuration (with >> RunsWhen=after) the snapshot could be automatically removed. > > He is using qcow2 format. > I didn't use it for the last five years but back then creating and > removing snapshots with qcow2 was done inside the same image file > and by removing the snapshot the used space wasn't freed once it was > allocated. > > I don't know if that changed over the last five years but it would > be a good idea to test it before putting it into production and > automation. >
Hello Josip, Yes, I think you are correct about this. I just checked on my Proxmox system (uses KVM for the hypervisor), and I see that when a VM is snapshotted, there is no additional disk snapshot file created. I had been remembering a script I wrote for Xen hypervisor VMs where I would first snapshot the VM, then, if that succeeded, there is a command to export the VM like: xe vm-export vm=snapshotID filename=someFileName And then my FileSet would point to the directory where these snapshotted/exported VMs were written to. On my Proxmox system, the qm command (the Qemu/KVM Virtual Machine Manager) has "snapshot" and "delsnapshot" commands, but does not seem to have a similar "vm-export" command to export the snapshotted VM to a dir where it may be backed up from. So, it would appear that if "image" backups of KVM VMs are desired, then the RunsWhen=before script would need to trigger a VM shutdown, and then the RunsWhen=after script would need to restart the VM. Not the most desirable way to backup VMs, to be sure. :( Thanks for your comment! Bill -- Bill Arlofski http://www.revpol.com/bacula -- Not responsible for anything below this line -- ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users