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 comments
  1. prasad
    prasad
    March 12, 2015 at 3:16 pm

    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

    Reply
    • skytech
      skytech
      March 15, 2015 at 5:29 pm

      Hi Prasad,

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

      Thanks

      Reply
  2. skytech
    skytech
    March 15, 2015 at 5:28 pm

    Hi Prasad,

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

    Thanks

    Reply
Leave a Reply

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

SiteGround.com

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.

TRY FREE

* up to 30 days money back guarantee