How to Backup and Restore the Subversion Repository

In this post, i will show you on how to backup and restore the subversion repository using svnadmin command.

To backup the repository, run below command :

     
    [root@server ~]# mkdir /mysvnbackup
    [root@server ~]# svnadmin dump /svn/repos/testsvn > /mysvnbackup/testsvn.svndump
    * Dumped revision 0.
    

To restore the repository, run below command :

    [root@server ~]# rm -rf /svn/repos/testsvn
    [root@server ~]# svnadmin create /svn/repos/newtestsvn
    [root@server ~]# chown -R apache:apache /svn/repos/newtestsvn
    [root@server ~]# svnadmin load /svn/repos/newtestsvn < /mysvnbackup/testsvn.svndump
    

3 Replies to “How to Backup and Restore the Subversion Repository”

  1. I have restored the backup in to the new repository but when i try to checkout the new repository using tortoise SVN, its asking user name and password. After entering the login details its again and again asking the username and password multiple times..please help on this

    1. Hi Prasad,

      Do you implement any type of authentication on older repository ? You can look at “AuthzSVNAccessFile”. Can you share the subversion.conf ?

      Thanks

  2. Hi Prasad,

    Do you implement any type of authentication on older repository ? You can look t “AuthzSVNAccessFile”. Can you share the subversion.conf ?

    Thanks

Leave a Reply

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