How do I back up a remote SVN repository

后端 未结 9 1277
被撕碎了的回忆
被撕碎了的回忆 2020-12-22 20:04

I am currently moving my SVN server from my home server to my remote server so I can access it more easily from other locations. My remote server is not backed up so I want

9条回答
  •  隐瞒了意图╮
    2020-12-22 20:44

    As of subversion 1.7, you can also use the new command svnrdump. From the docs:

    Dump—that is, generate a repository dump stream of—revisions of the repository item located at SOURCE_URL, printing the information to standard output.

    Usage would be:

    svnrdump dump http://example.com/repos/ > repos.dump
    

    This creates a "dump file" of the repository in repos.dump. This is a complete backup of your repository data including history, but is not directly readable by a subversion client. If you need to restore this data, use the standard svnadmin tools:

    svnadmin create c:\backup-repos
    svnadmin load c:\backup-repos < repos.dump
    

    Haven't done any testing, but this might end up being slower than svnsync. svnrdump will do a complete dump of the repository everytime, where I'm assuming synsync will only import changes in the repository since the last time it was run. You will have a single file containing your entire repository though, which may or may not be easier to manage.

    Note that you may want to pipe the output of svnrdump through gzip or similar program to possibly significantly reduce the size of the outputted file.

提交回复
热议问题