dguerri / LibVirtKvm-scripts

Libvirt/KVM scripts - online forward incremental backup for libvirt/KVM virtual machines
GNU General Public License v3.0
72 stars 26 forks source link

Support of different backup strategies; be not dependend on cp #28

Closed MaStr closed 8 years ago

MaStr commented 8 years ago

Thank you for your interesting and inspiring script. I was wondering, if it is possible to come around of the commands against the backup folder.

As far as I understand, the libvirt command for snapshots are used to create the multiple set of disk files on an incremental basis. The script uses "cp" for moving the different parts to the backup directory. The incremental qcow2 files are located next to the basis image.

For consolidating the files, virsh uses the the files around the basis image, but not against the backup directory.

Line 331ff seems mostly for creating some "paranoia checks" and then copy over the new file.

So, I'm asking & suggesting to make the "copy to backup folder" part optional or "different". And I would like to see rsync with --delete-after in place, working wildcard-based.. or something else like lftp.

My problem is, that I'm running in an environment on a dedicated root server and my backup space can only be addressed using FTP. For some reason FUSE-FTP delivers I/O errors. I already setup "reoback" for doing incremental daily FTP backups, but that script fails with secondly changing images because of running domains and , ontop, copies the complete image file again & again, which wastes endless space.

What do you think?

best regards Matthias

AJRepo commented 8 years ago

Assuming you are talking about a running VM? The "cp" doesn't run if you don't use the -b flag. And the consolidation doesn't run unless you use the -C or -c flags. So, have you tried, instead of using the -b and -C flags, doing the following ( assuming you are running on VM domain "foo" )

1) run snapshot

fi-backup.sh foo

2) do anything you want with the backing file, (e.g. rsync, scp, sftp, etc)

3) then consolidate.

 fi-backup -c foo

(note lower case "c" for consolidate only, not the upper case "C")

MaStr commented 8 years ago

Hi, oh many thanks. I did not read that from documentation.. and I read the debug messge

[DEB] No backup directory specified

as an error message. My fault, I'm not very fit today.

Thank you for that information, I'll close that issue!

best regards Matthias