I'm currently running rsnapshot on host1, backing up some files from host2 using the inbuilt SFTP support (I have daily, weekly, and monthly backups running in a standard rsnapshot configuration). Both hosts are running Ubuntu and use LVM. Is there any straightforward way I can create and mount LVM snapshots on host2 to back up from, before a backup run is started, and delete them afterward, to increase the consistency of the set of files that are backed up? It looks like more recent versions of rsnapshot have LVM support built in using the
linux_lvm_* commands, but that only seems to work when backing up from the same host, which I'm not doing. Ideally the mechanism ought to be fairly failure redundant, i.e.:
- The LVM snapshots on host2 should be deleted after the backup is completed, whether it was successful or not.
- If a snapshot cannot be created, the backup doesn't proceed.