How to SVN ( Subversion ) Dump and Restore

As a system admin we know the importance of backup. This article will help you to how to Backup and Restore SVN (Subversion) repository on Linux.

Eg 1. Backup (dump) SVN Repository
# svnadmin dump /var/www/svn/myrepo > /backup/svn/myrepo.dump
* Dumped revision 0.
* Dumped revision 1.
* Dumped revision 2.
Eg 2. Compressed Backup (dump) SVN Repository

Following command will take backup of “myrepo” repository and compress it in .gz format.

# svnadmin dump /var/www/svn/myrepo | gzip -9 > /backup/svn/myrepo.dump.gz
Eg 3. Restore (load) SVN Repository

Below example will help you to restore repository from a backup file. For this example we are creating new repository to restore dump.

Create a new repository

# svnadmin create /var/www/svn/mynewrepo

Restore dump to newly created repository

# svnadmin load /var/www/svn/mynewrepo < /backup/svn/myrepo.dump
<<< Started new transaction, based on original revision 1
     * adding path : svn-auth-screen.PNG ... done.
     * adding path : template.txt ... done.

------- Committed revision 1 >>>

<<< Started new transaction, based on original revision 2
     * adding path : file1.txt ... done.
     * adding path : file2.txt ... done.

------- Committed revision 2 >>>


Founder of I love to work with Linux and other open source application. Also I like to share knowledge with my friends and other Linux users. Follow me on Twitter, Add me on Google+ or Like Facebook page.


  1. How can we add/remove user permission of an SVN repository from a common Password file Eg:(“/etc/svn-auth-conf”?

Leave a Reply