Backup a Subversion Repository with svnadmin dump

I recently created a new Subversion repository for a new personal project, and realized I needed to add it to my daily backup script. After a quick bit of searching via Google to refresh my memory, I found exactly what I thought I was looking for:

svnadmin hotcopy /svn /backups/svn --clean-logs

Indeed, O'Reilly's Version Control with Subversion states that svnadmin hotcopy will make a hot copy of a repository, and "is able to make a safe copy of the repository at any time, regardless if other processes are using the repository." However, further research seemed to indicate that the following may be a better option:

svnadmin dump /svn > /backups/svndump-`date %Y%m%d`.dmp

According to several posts on the Subversion mailing list, svnadmin's hotcopy "theoretically needs the correct machine architecture, version of bdb (if it's a bdb repo), and version of Subversion to work"; however, svnadmin's dump could "theoretically be loaded by any future version of Subversion". Whether or not that's actually true, since there are numerous "theoretical" qualifiers, I decided to go with svnadmin dump.

3 thoughts on “Backup a Subversion Repository with svnadmin dump

  1. Pingback: cron bug: silently fails when too much output is produced | CompleteFusion

Leave a Reply

Your email address will not be published. Required fields are marked *