-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full grown remote backup solution using virt-backup with host-side dedup & compression #37
Comments
I came to the same conclusion after a fair bit of search, really want to thank Anthony for this tool!
While I might not be the person most fit to answer these questions, I do like to chime on this issue. For my use case (at my last job) I have a NFS server on LAN, and the a backup folder exported by the NFS server is mounted on the VM host running virt-backup under However no de-duplication is done for my setup. So I can only keep a few backups for each VM before the NFS server run out of space. For other remote targets such as SSH, S3, GCS, B2, etc. there may be FUSE counters parts (e.g. sshfs, s3-fs) that can be used instead. Again, these does not take de-duplication into account. |
Hey @deajan and @shunghsiyu, The thing about virt-backup is that I use it for my personal infrastructure, with just 2 hypervisors (which are not in cluster). The issue with what you want is that my needs are pretty simple, so I avoided to write an overkill solution for that. However, now that I've split how the storage is handled, it's pretty easy to add a new way to store the backups: https://github.com/aruhier/virt-backup/tree/master/virt_backup/backups/packagers A packager needs to implement to these abstract classes: https://github.com/aruhier/virt-backup/blob/master/virt_backup/backups/packagers/__init__.py#L30
Indeed, I use glusterfs as target. Well, my disks are stored locally, but my backups are on glusterfs. I just use a fuse mountpoint as a target for virt-backup. About the deduplication + compression, for some targets I started to rely on my filesystem to do it, instead of handling it via virt-backup. And handling the deduplication myself… well I could, at least per domain, but it would need a good rework of the packagers (again :p). I couldn't keep one archive file per backup, would need to move to a structure that allows the backups to be modifiable without rewriting multiple GB to remove a backup, etc. Well, what borg is already doing doing in fact. And borg has the advantage to be more mature. What I can do on the other hand is a "relay" packager: a packager that does nothing but calling some given commands to correctly responds to the API. It could be configured like that from the config file:
This scripts could return something in json that the packager could parse. This way you could for example rely on virt-backup to handle the external snapshots and everything, and instead of handling the copy itself, it would trigger the backup of a specific image. Then once it's done, it could continue as normal. |
@aruhier, thank you for the most advanced KVM backup solution available and also for your detailed explanation about internal virt-backup structure. |
Hello Anthony,
I've been searching for a good KVM backup solution like the holy graal, without success.
Even a big commercial solution turned out to be a basic "virsh snaphot and copy" script in disguise with a polished GUI, but without compression, deduplication, or even good WAN support.
The solution even executed virsh command lines instead of using libvirt directly, making it more error prone.
Anyway, I came to the conclusion that there aren't a lot of good options (the options being vProtect, Acronis, SEP and Netbackup, the latter ones being quite pricy).
A couple of months ago I reviewed your solution as a potential problem solver, the only missing part being deduplication and WAN support.
Fast forward, I think a complete remote friendly KVM backup solution can be achieved by combining your virt-backup solution with borg backup, which would handle onsite dedup and compression before sending the backups through the network. It also supports resuming sending files on errors, and of course backup retention.
Other similar backups solutions include duplicity, bup, burp etc, but borg has the advantage of being written in Python, hence being interfacable with virt-backup without too much hassle.
Using the directory packager without any retention, virt-backup would only lack the ability to have pre and post backup hooks in order to achieve this.
What would you think of such a solution ?
Also, I guess your use case for virt-backup might include remote storage ? What do you use to move your virt-backup generated files ?
Best regards.
Btw, congratz for having coded such a nice tool. Code also seems quite polished, even if some comments would have been nice for other devs to easier produce PRs. Anyway, very nice tool.
The text was updated successfully, but these errors were encountered: