coderex
coderex

Reputation: 27885

How to backup & restore SVN repository?

I have a Subversion repository configured in the windows server, having 2000 more revisions. I would like to move it from Windows to Linux, so I want to backup all the revisions & restore to the new svn configuration under linux.

How do I do that ?

Upvotes: 6

Views: 6949

Answers (2)

bahrep
bahrep

Reputation: 30672

Upgrade to VisualSVN Server 3.6 to use the built-in scheduled backup and restore feature. Version 3.6 also adds scheduled repository verification.

If you look for a one-time backup, you could use Backup-SvnRepository PowerShell cmdlet. To recover the repository, use Restore-SvnRepository.

Upvotes: 0

anorm
anorm

Reputation: 2263

I see you've tagged your question with [visualsvn]. Given that you're using the VisualSVN server, you would start the 'VisualSVN Server Manager' application. On the root node in the server tree, right-click and select 'All Tasks->Start Command Prompt'

From the new command prompt, you can dump your repository by issuing:

svnadmin dump /path/to/your/repo > yourreporname.dump

Copy the dump-file to your new server and type:

cd /path/to/your/new/repo
svnadmin create reponame
svnadmin load reponame < yourreponame.dump

VisualSVN handles access rights on its own, so you'll need to copy the access rights manually.

EDIT: VisualSVN uses Apache as a front-end server. I guess you could extract the access rights from Apache's configuration files in some way.

Upvotes: 8

Related Questions