Backing up and restoring your Subversion repository

Most tutorials around show how to backup your Subversion repository:

svnadmin dump /path/to/your/repository > ./repository.dump

And how to restore it:

mkdir /new/path/to/your/repository
svnadmin create /new/path/to/your/repository
svnadmin load /new/path/to/your/repository < ./repository.dump

But don’t tell you what to do to solve the problem that will arise when you try to restore it:

svnadmin: Dump stream contains a malformed header (with no ':') at '* Dumped revision 0.'

The solution is too simple; just run:

grep --binary-files=text -v '^* Dumped revision' ./repository.dump > ./repository.clear-dump

Now you should be able to restore your subversion repository with no problems:

svnadmin load /new/path/to/your/repository < ./repository.clear-dump

PS: I don’t use hotcopy because I prefer to have a single file for these backups.

2 Comments Backing up and restoring your Subversion repository

  1. Pingback: being (no)body » m3talink for June 4th

  2. vadim

    Gustavo, please help me

    I filter my repository using “” script like following:
    cat dump1Renew.dump | python.exe –drop-empty-revs –renumb
    er-revs Rep1 trunk

    next i create repository manually using a tortoise SVN

    then i try to load my filtered dump to new repository type following command:

    $ svnadmin load –ignore-uuid CopyRep1 ./repository.clear-dump” thw same problem occurr

Comments are closed.