Backup & Recovery for a subversion repository

Tue 31 July 2007

Create a backup of the repository using the following command:

    svnadmin dump /path/to/repository | gzip > repository-backup.gz

Run the svnadmin recover command on the repository:

    svnadmin recover /path/to/repository

Delete any unused log files in the repository:

    svnadmin list-unused-dblogs /path/to/repository | xargs rm -vf

Delete any remaining shared-memory files in the repository:

    rm -f /path/to/repository/db/__db.0*