Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to recover repository using SVN hotcopy?

Okay. I used svn's hotcopy to make incremental back-ups, now how do I test that the hotcopies will work properly?

I searched the posts here regarding hotcopy. Most of them seem to just be encouraging the use of the svn hotcopy, but not talking about how to recover using hotcopy once made.

Is there any advice about how to recover using the hotcopy that I've made?

I also checked http://svnbook.red-bean.com/, but couldn't really find anything.

Thanks.

like image 215
JustADude Avatar asked Oct 23 '09 00:10

JustADude


1 Answers

svnadmin hotcopy will always create full copies of your repository. It is not possible to do incremental backups with svnadmin hotcopy.

svnadmin hotcopy works like a filesystem copy command, except it will never copy open transactions.

To restore a repository you can just svn hotcopy your backup to the place from which you want to serve it.

For checking the integrity of a repository use svnadmin verify

eg:

assume your svn repos are on /var/svn/repos and your backups are stored on /var/backups/svn and your repository my_project is broken.

Use:

svnadmin hotcopy /var/svn/repos/my_project /var/backups/svn/

to create a new backup (do this every day or week..) and:

svnadmin hotcopy /var/backups/svn/my_project /var/svn/repos/

to restore your backup (note: you have to remove your repo before, as hotcopy will not overwrite your old repo, also you really should look for the cause of your repository failure).

Also use:

svnadmin verify /var/svn/repos/my_project

for checking the integrity of your repository

like image 51
Peter Parker Avatar answered Oct 21 '22 09:10

Peter Parker