[clug] database backups with git

Ben Nizette bn at niasdigital.com
Fri Jun 8 01:04:38 MDT 2012

On 08/06/2012, at 11:46 AM, Robert Edwards wrote:

> I have been playing with keeping daily text dumps of my database in
> git, in lieu of rotating or date-stamping them. I haven't seen many
> references on the web about people doing this. Is it a good idea or
> no?
> For example, daily PostgreSQL database dumps of a mediawiki site over
> a 3 month period get up over 500MB, but in git, that is reduced to
> around 160MB. Then I can rsync the git repository of the backup file
> to another server a bit faster (most of the hashes are the same, only
> the new ones get to go over the wire).

If you're mainly using git as a way to efficiently pack text dumps, have you looked at projects like lrzip?  It offers massive compression for packing multiple text-ish files which contain plenty of duplicate info (e.g. 2.3GB worth of kernel source trees packed in to 64MB).

Donno how it would play with rsync, the whole pack would have to go across each time rather than just the new hashes, but it might be worth checking out.


> Anyone else use a VCS for maintaining snapshots of backup files/logs?
> What is the downside?
> Cheers,
> Bob Edwards.
> -- 
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux

More information about the linux mailing list