How to efficiently backup a bare repository?
- Date: Fri, 23 Nov 2018 11:23:20 +0100
- From: Guilhem Bonnefille <guilhem.bonnefille@xxxxxxxxx>
- Subject: How to efficiently backup a bare repository?
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
Thanks in advance for any tips letting improve the backup.
-=- JID: guyou@xxxxxxxxxxxx MSN: guilhem_bonnefille@xxxxxxxxxxx