How could I enable automatic (incremental) backups of a Mercurial (central/main) repository?
I'm coming from subversion where I was able to make a commit-hook that uploaded changes to S3.
Edit: If this sort of strategy doesn't make sense for Mercurial, what backup strategy would make sense?
The beauty of how simply the DVCS's store history is that you can do this in a million different ways. You could write a commit hook, but I found it easier to just do it manual push + cron.
My simple and most likely naive approach:
I push to my central repository. My backup server pulls from the central repository every 10 minutes. Every day at 2:30am the central repository gets gzip'd and downloaded to the backup server. When I boot up my local machine I download the latest gzip backup and if I cared enough I could burn those to a CD.
So at any given moment I have at least 3 fairly recent backups and 3 recent working copies stored at different locations around the continent. If all of these fail I will be more worried about the rise of skynet then that I lost my project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With