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