How to migrate SVN repository?


There are only few easy steps to migrate svn repository. This post is for my own notes, in case i forget how to migrate svn repository again!

Below is the steps to migrate SVN repository:-

Advertisements

  • Start your terminal

  • This steps is to transfer your dump file to your new machine. You will prompt to enter password for the new machine.
  • Now your SVN dump file should be in new machine
  • Login to your new machine
  • Done, you just just migrated your svn repository

* If you dump file is too big for transfer, you can compress it using tar before sending over thru network.
Tar command for compress:

Tar command for uncompress:

Related posts:






Share this with your friends:-

11 Responses to “How to migrate SVN repository?”

  1. Amit Mishra says:

    Nice summarized content..helped in saving a lot of time in bringing my task to closure..thanks a ton

  2. ae says:

    Great article, I just used it to migrate from svn 1.1 on an old server to 1.7 on a new one. Everything seems good.

    In response to other comments, one way to deal with large dumps is to transfer them directly over the network. This is what I did:

    Create the repo on the new server:

    me@newserver$ svnadmin create /path/to/new/repo

    And then transfer from the old to the new with ssh:

    me@oldserver$ svnadmin dump /path/to/old/repo | ssh me@newserver sudo svnadmin load /path/to/new/repo

    This puts the output of the dump (on the old server) to standard output, which is then piped to the ssh command, which is then directed to standard input of the load command.

  3. Blackberry says:

    Hi,

    I have a large dump file (100 GB), what is a best way to filter out / decrease the size. AFAIK removing old revisions isnt a safe way.

    Please guide.

    Thanks,

  4. Koen says:

    Thnx for the tips. Saved me time.

  5. Robin says:

    Since the dump is only a single file, you do not need tar.
    You could even add the gzip compression to the dump command:

    svnadmin dump /path/to/your/repo | gzip -c > yourreporname.dump.gz

    And load it to the new server with:

    gzip -cd yourreporname.dump.gz | svnadmin load reponame

    Or use bzip2 instead of gzip; slower, but better compression. May be an issue when transfering the large file to the new machine.

  6. xrigher says:

    great article. saved me a lot of time. thx very much!

  7. Rengarajan says:

    Thank you. Very useful. Made my job very simple and effective.

  8. Jack says:

    Thanks a lot! Very helpful.

  9. Mario Uzae says:

    Thank you very much, my friend.

  10. chua says:

    thanks doug schlenker for the correction!

  11. small typo:
    scp yourreponame.dump username:new.machine.ip:/path/to/your/new/repo
    should be:
    scp yourreponame.dump username@new.machine.ip:/path/to/your/new/repo

Leave a Reply