Git as backup

By | June 2, 2012

Backups are good. Version-controlled backups are better. After my scheduled backup managed to over-write the contents of an important matlab script I realised that I needed to incorporate version control into my backing up.

http://codebetter.com/robconery/2009/12/15/using-git-as-a-backup-tool/is guide more comprehensive than I need for using git as a backup.

The most important part is

git add . & git commit -am “Periodic backup %DATE%”

If I save this line in a batch file I can task scheduler to run git at the end of every day, just before a similar scheduled task runs to backup my files, including the git file.

EDIT: http://wekeroad.com/2009/12/15/using-git-as-a-backup-tool/ Link is broken, so replaced with a more up-to-date one.