How to backup & restore SVN repository?
I have a Subversion repository con开发者_如何学运维figured 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 ?
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.
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.
精彩评论