Hello, the purpose is to allow the script to make "hot" backups using
LVM snapshots.
LVM snapshots allow to create a virtual copy of a filesystem which is
frozen in time and can be mounted and read (and backed up) without
interfering with the real filesystem, which in the meantime can still
be read/written.
When using LVM snapshots the scripts does the following:
suspend vm -> create LVM snapshot of the filesystem containing the vm -
> mount the LVM snapshot in another folder -> resume the vm -> start
backing up the folder where the LVM snapshot is mounted -> when the
backup is finished the LVM snapshot gets unmounted and then removed
The advantage is that the vm needs to remain suspended only for the
time needed to create the LVM snapshot and to mount it, which is a
very short time.
The disadvantage is that to be able to use LVM snapshots the physical
host must be specifically configured, in fact;
- the VMs need to reside on an LVM volume
- the LVM volume needs to have free physical extents, which are used
to create the LVM snapshot (the free physical extents are used to
store the modifications made to the real filesystem for as long as the
LVM snapshot exists).
Have a nice day,
Michele