PrevUpHomeNext

Scheduled Backups

I won't go into detail here about the differences between CVS and Subversion. There's plenty of solid documentation already available. One thing worth mentioning is the strategy we adopted for Subversion backups. Previously, our CVS repository had been mirrored to a backup machine using an rsync job scheduled to run every couple of hours. Tape backups of this mirror were kept offsite.

I had some reservations about this strategy, particularly since (thanks to our hyperactive and insomniac automatic build user) the CVS archive was rarely quiet. Simply treating the CVS archive as a bunch of files—which is what rsync does—seemed risky. Would the mirror be in good shape if rsync ran in parallel with a check-in?

Subversion provides the ability to make a hot backup of a live repository using the svnadmin hotcopy command. So, something as simple as:

svnadmin hotcopy /path/to/live/repository /path/to/mirror/repository

creates a full mirror of the live repository—if you're prepared to wait a while, that is.

Once this mirror has been created, it can be maintained by merging in incremental changes using svnadmin dump --incremental to dump the changes and svnadmin load to load them into the repository mirror.

Copyright © 2006 Thomas Guest

PrevUpHomeNext