Web lists-archives.com

How to efficiently backup a bare repository?




Hi,

I'm managing many bare repositories for development teams.

One service we want to offer is to let developers retrieve old state
of the repository up to 30 days. For example, one developer
(accidently) removed (push -f) a branch/tag and realize few days later
(after vacations) that it was an error.

What is the best approach to do this?

Currently, we use a classical approach, backuping all the repo every
day. But this is far from efficient as:
- we accumulate 30th copies of the repository
- due to packing logic of Git, even if the content is mostly similar,
from one backup to another, there is no way to deduplicate.

Is there any tricks based on reflog? Even for deleted refs (branch/tags)?
Is there any tooling playing with the internal of git to offer such
feature, like copying all refs in a timestamped refs directory to
retain objects?

Thanks in advance for any tips letting improve the backup.
-- 
Guilhem BONNEFILLE
-=- JID: guyou@xxxxxxxxxxxx MSN: guilhem_bonnefille@xxxxxxxxxxx
-=- mailto:guilhem.bonnefille@xxxxxxxxx
-=- http://nathguil.free.fr/