Restore Subversion from file backups

5

I recently had to send in my computer for repairs, and my hard drive ended up getting replaced. Luckily I had a backup of the files, but no system image.

I'd like to get my SVN repositories back, but I don't have a dump out of SVN, just the repository directories on the hard drive.

Is there a way to rebuild my SVN repositories from just the files on the hard drive without having a dump file? How do I do that?

jjeaton

Posted 2011-05-14T15:49:14.347

Reputation: 397

Have you read the book?

– Turbo J – 2011-05-14T16:36:05.387

I have, it mentions using hot-backup or svnadmin dump to backup your repositories. It's already too late for me, I just have the filesystem backup, with no hot-backup or dump file. – jjeaton – 2011-05-16T13:52:30.750

Answers

2

Do you have a backup or not?

If you have a backup, just put the backuped files for the SVN repositories to the place where they belong. To check them first, just run

svnadmin dump /path/to/backuped/repos >> /dev/null

Turbo J

Posted 2011-05-14T15:49:14.347

Reputation: 1 919

So I created a new blank repository on the new system. Then ran your command svnadmin dump /path/to/backuped/repos >> dump_file then ran an svnadmin load /path/to/backuped/repos < dump_file and it appears that the repositories are back in there. Thanks. – jjeaton – 2011-05-18T04:53:18.057