Using git doesn't seem like the right fit. If you really prefer it that way, have a look at git bup which is a git extension to smartly store large binaries in a git repo.
That said, I recommend rsnapshot, rdiff-backup.
I most certainly DO NOT recommend LVM snapshots for this1.
- The write performance will degrade badly
- On those volumes, a snapshot will cause boot times in the many minutes, if not hours (here)
- there are fatal gotchas when running out of space
- and the last time I checked anything like a rollback was still a remote promise
- Mind you that even mounting a snapshot alongside your live filesystem could prove to be very tricky because of filesystems relying on guids to be unique in the fs header
- Also, barring the use of iSCSI or DBRD (etc) you're stuck on the same host as the live fs, making the backup far less useful (and degrading performance even more)
For this kind of scenario, I prefer ZFS (send, receive). To be honest, I think zfs-fuse might be too slow (but test it!) at the moment, but zfsonlinux seems to come along nicely and might give you a lot to work with.
1 I just retrieved this tidbit I wrote earlier about this subject:
However, I can no longer count the different failure modes I encountered when using snapshots. I've stopped using them altogether - it's just to dangerous.
The only exception I'll make now is my own personal mailserver/webserver backup, where I'll do overnight backups using an ephemeral snapshot, that is always equal the size of the source fs, and gets deleted right afterwards.
Most important aspects to keep in mind:
- if you have a big(ish) fs that has a snapshot, write performance is horribly degraded
- if you have a big(ish) fs that has a snapshot, boot time will be delayed with literally tens of minutes while the disk will be churning and churning during import of the volume group. No messages will be displayed. This effect is especially horrid if root is on lvm2.
- if you have a snapshot it is very easy to run out of space. Once you run out of space, the snapshot is corrupt and cannot be repaired.
- Snapshots cannot be rolledback/merged at the moment (see http://kerneltrap.org/Linux/LVM_Snapshot_Merging). This means the only way to restore data from a snapshot is to actually copy (rsync?) it over. DANGER DANGER: you do not want to do this if the snapshot capacity is not at least the size of the source fs; If you don't you'll soon hit the brick wall and end up with both the source fs and the snapshot corrupted. (I've been there!)