Svnadmin Dump And Load Over SSH

Share

This is how I mirrored my subversion repository over a SSH connection:

svnadmin dump /path/to/repository |ssh -C username@servername 'svnadmin -q load /path/to/repository/on/server'

Before this works you need to log in on the server servername and create a repository with e.g. svnadmin create /path/to/repository/on/server.

Share
  • Maria

    Hello, Martin!
    I need to do the same thing: dump and load svn repos to a remote server, so i tried your recommendation, but got some error messages:
    * Dumped revision 0.
    * Dumped revision 1.
    * Dumped revision 2.
    * Dumped revision 3.
    * Dumped revision 4.
    svnadmin: Can’t open ‘/var/svn/bckups/db/tempfile.tmp’: Permission denied
    svnadmin: Can’t write to stream: Broken pipe
    “bckups” is my directory on the remote server to which I load the repos, so it seems like it can’t open the tempfile.tmp on the remote server.
    I am able to reach my server via ssh (in fact, most of the file do get “transferred”), so I am not sure what permission (local or remote) is needed. I should be able to run the dump/load command over ssh without having root permissions, right?
    Also, one of the subdirectories of the main directory that i’m dumping isn’t showing on the remote server at all (i’m viewing it with “ls”). So when i’m trying to dump and load just that directory separately, i get this:
    svnadmin: Can’t open file ‘/var/svn/code/dav/format’: No such file or directory
    svnadmin: Premature end of content data in dumpstream
    Any thought of what might have caused these and how I can fix it?

    I appreciate any help! thank you!

  • Pooja

    I had same error while commiting changes in some files and was forgetting ‘svn update’ before doing ‘svn commit’.
    After doing that.. problem was solved.