G'Day Serge,
On 28/07/2007, at 10:01 PM, Serge van Ginderachter wrote:
... 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.
You can specify subdirectories, the following would back up the path /
path/to/files/ in VG vg0, LV data:
backup lvm://vg0/data/path/to/files/ lvm-vg0/data/
Note that if you want to do multiple paths within a logical volume,
you can use multiple 'backup' lines as per "normal" local/ssh/rsync
paths, but the LVM snapshot will get created/mounted/unmounted/
removed for each reference. This has no negative other than being
more than the minimal number of lvcreate/etc cycles. An optimisation
would be to detect and amalgamate multiple 'backup' entries that have
the same LV.
i.e. this works, but is not the most efficient:
backup lvm://vg0/data/path/to/files/ lvm-vg0/data/
backup lvm://vg0/data/path/to/morefiles/ lvm-vg0/data/
backup lvm://vg0/data/anotherpath/to/files/ lvm-vg0/data/
The code logic is essentially in rsync_backup_point() to detect if
the src path is an lvm:// path (is_lvm_path), if so it extracts the
first two parts of the lvm:// path (the VG and LV names, e.g. "vg0/
data") and does the lvcreate and mount using the vg and lv names. It
rewrites the src to the appropriate local filesystem path (prepending
the mount point to the remaining src). The normal rsync thing gets
done, and then we unmount and lvremove the LVM snapshot. Pretty easy :-)
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.
Ah, silly me. I just copied the version from my distribution, Debian
unstable (should've checked out CVS of course). Anyway, it's
rsnapshot 1.2.9. I'll create a patch against CVS tomorrow night, if
that'll help.
Rgds,
Ben
--
Ben Low
ben < at > bdlow.net
"What do you take me for, an idiot?"
- General Charles de Gaulle (1890-1970), when a journalist asked
him if he was happy
-------------------------------------------------------------------------
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
