On Fri, 2007-07-27 at 23:30 +1000, Ben Low wrote:
This is a rationale and patch to add explicit LVM snapshot support to
rsnapshot.
I very much like the idea. It just happens I was experimenting with lvm
to make a backup of a zimbra setup. (1)
It would also help on different setups were rsync encounters "vanished
files", which I encounter daily.
I wanted to use rsnapshot on various LVM logical volumes, and
initially considered the cmd_preexec option to create and mount all
of the LVM snapshots and cmd_postexec to unmount and remove them
afterwards. This would work, though is less than ideal as you need to
allow a reasonable amount of space for the LVM snapshots (say 10%),
and I don't have that much space free. It would also a pain to
maintain the separate pre- and post-exec scripts.
Ack.
Better would be to create+mount each snapshot "on demand", i.e. for
each backup. This has a number of benefits, including not needing as
much snapshot space as the snapshots are only kept for as long as
they need to be (not hanging around for the entire backup). The
attached patch adds support for the 'lvm://' backup option:
backup lvm://vg0/home/ lvm-vg0/home/
backup lvm://vg0/data/ lvm-vg0/data/
Nice. Does the backup source takes a logical volume only, or can one add
subdirectories of the lvm? I would expect the latter one.
This will take an LVM snapshot of vg0/home, mount it, take an
rsnapshot as per any normal filesystem, unmount the snapshot, and
remove it. It will then repeat the exercise for vg0/data.
Seems to work very well for me. Only niggle is that the current
versions of lvcreate and lvremove emit "created" / "removed"
messages, they need a "--quiet" option.
Can you confirm on which version of rsnapshot this patch is based? I'll
have a look and test it on my zimbra test host.
(1)
http://wiki.zimbra.com/index.php?title=Open_Source_Edition_Backup_Procedure
Serge
--
Serge van Ginderachter http://www.vanginderachter.be/
Philip Paeps wrote on Monday 10 April 2006 22:31 in be.provider: > Ik
ben de diplomaat niet.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
