Use LVM snapshots with TKLBAM to get consistent backups

Registered by Jeremiah Snapp

System backups ideally should be from a point-in-time snapshot of the file-system to prevent data modification during the backup process.

This can also reduce the time for database backups since a snapshot can be taken of a properly quiesced MySQL or Postgresql database and then backed up as a normal file-system backup instead of running a separate backup tool like mysqldump which typically takes longer.

LVM capability has been added to the 11.0 release of TKL so this seems like a good time to evaluate default appliance use of LVM as well as TKLBAM's use of LVM.

I suggest configuring each appliance to leave a small percentage of hdd space available for snapshots instead of filling all the space with the root partition.

Then consider configuring TKLBAM to run pre and post scripts that freeze applications (mysql, postgresql, etc), snapshot the filesystem, unfreeze applications, backup the snapshot and then delete the snapshot.

Blueprint information

Not started
Needs approval
Series goal:
Accepted for 12.x
Milestone target:

Related branches



You read our minds... Kudos!

One of the main reasons for adding LVM as the default in 11.0 was to allow TKLBAM to take advantage of LVM snapshots if its supported on the system (ie. it's the default but not required). You raise a good point about leaving unpartitioned space, we'll look into that.

I've added Liraz as the assignee for this blueprint as he will be implementing the functionality.


UPDATE: 16/12/2010

I've updated di-live (the installer) to default the root volume to use 90% of the available space of the volume group. This leaves us with 10% free space for the snapshot which should be enough in most use-cases. The user can still tweak this value though, so we are considering adding a snippet to the dialog text that explains why the 90%, and the associated implications.

Again, thanks for raising the issue!



Work Items

This blueprint contains Public information 
Everyone can see this information.