With Subversion now moved to my new QNAP, I need to start worrying about proper operational procedures under the new environment. One important bit is worrying about the Backup.
My repositories have grown rather large (at least some of them) and a daily full dump of the data is out of question. Instead, I am looking for a method that allows me one full dump, followed by a set of incremental dumps, created each time data is committed.
For the moment, let’s just assume that I will place the incremental backups in a dedicated directory on my RAID 1 Mirror (later-on, it might be an external HDD attached to the QNAP).
The implementation is easier than you might think – especially when using the already available SVN Hooks.
chmod +x post-commit
Now edit the file, for example using nano. This is what you want to have in the file:
Note that the hook is repository-specific! You can copy the file to a different repository (again, into the hooks directory) and all you need to do is rename the PROJECT variable to make sure to commit into a different target location.