May 30th 2008 09:03 am

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.

1 Comment »

One Response to “Backing up and restoring your Subversion repository”

  1. being (no)body » m3talink for June 4th on 05 Jun 2008 at 12:47 am #

    [...] Gustavo on Information Technology » Backing up and restoring your Subversion repository is Most tutorials around show how to backup your Subversion repository and how to restore it. But don?t tell you what to do to solve the problem that will arise when you try to restore it. The solution is too simple. [...]

Trackback URI | Comments RSS

Leave a Reply

By leaving a comment, you're licensing its contents under the terms of the Creative Commons Attribution-Share Alike 2.5 Spain License. More information.

« So long Debian servers, welcome Ubuntu | A silly yet killer feature in Poliglota »