Within the scope of a single backup I've a mix of live data sources.
For a live data source, e.g. /src/data1, that resides on a dedicated LV,
mount | grep vmail
/dev/mapper/VG0-LV_DATA1 on /src/data1 type ext4
(rw,relatime,dax=never)
I'd like to snapshot the volume prior to backup of the entire volume with
BackupPC
Reading online, I've found some old efforts -- script based -- on the ML, etc.
afaict, they've not been carried over to v4 (yet? at all?).
With v4, I see in config.pl _mention_ of snapshot
Optional commands to run before and after dumps and restores,
and also before and after each share of a dump.
...
One example of using these commands would be to
shut down and restart a database server, dump a database
to files for backup, or doing a snapshot of a share prior
to a backup.
in reference to (e.g.),
$Conf{DumpPreUserCmd} = '$sshPath -q -x -l root $host
/usr/bin/dumpMysql';
What level of LV snapshotting integration exists with v4, or planned work?
Is there any?
Or, does the `lvcreate -s (snapshot) ... etc etc` need to be externally
managed, and passed completely as an argument to $Conf{DumpPreUserCmd} ?
To my per-PC config,
/etc/BackupPC/pc/localhost.pl
I've added
$Conf{RsyncArgsExtra} = [ '--one-file-system', ];
as well as (initially) a list of shares' LV mount points, e.g.
$Conf{RsyncShareName} = [
'/src/data1',
'/src/data2',
...
'/src/dataN',
];
If snapshot 'integration' is limited, and I have to manage each target share's
snapshotting separately ...
... it's certainly DO-able, but messy.
Ideally, I'd _like_ to -- similar to rsnapshot's approach -- specify a
per-share target type, differentiating between 'filesystem direct' and
'snapshot'. Something like,
$Conf{RsyncShareName} = [
'lvm://dev/VG0/LV_DATA1, bkup_root:/, mount_name:src/data1',
'lvm://dev/VG0/LV_DATA2, root:/some/path, mount_name:src/data2',
...
'lvm://dev/VG0/LV_DATAN, mountpt:src/dataN',
'/usr/local/some/path1',
'/usr/local/some/path2',
];
wherein for 'lvm://'
- a snapshot (e.g., 'snap-LV_DATA1') is created in the parent VG,
/dev/VG0
- BackupPC mounts /dev/VG0/snap-LV_DATA1 to
/config'd/tmp-mount/path/BackupPC-snap
- BackupPC rsyncs /config'd/tmp-mount/path/BackupPC-snap/ ->
$TOPDIR/'mount_name'/
- on ok backup, snapshot's destroyed
- next share ...
So, is this currently doable/planned in BackupPCv4+?
If it's there, I've missed it.
If it's not, it'd be quite useful to have in a well-thoughtout, integrated
feature -- rather than YA-DIY script.
_______________________________________________
BackupPC-users mailing list
[email protected]
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/