Svn – Getting error “svnadmin: File already exists” for `svnadmin load`

svn

I am struggling trying to load a incremental SVN backup made using svnadmin dump --incremental.

I have based my backup script on the ServerFault post:
Incremental Backups of SVN Repository daily ? (OS = UNIX)

The first revision of each new backup is the last revision of the previous backup, is this correct?

E.g.:

  • Backup1: rev 0 to rev 100

  • Backup2: rev 100 to 154

  • etc

When I'm trying to load these backups into a new server (using svnadmin load), I am getting the error svnadmin: File already exists errors for the first revision in the second backup.

Best Answer

Your backup1 and backup2 dumps contain a revision that exists in both of them: rev 100. So when performing svnadmin dump with --incremental on a range of revisions make sure that these dumps don't overlap.

For example in your case the backup1 and backup2 should contain:

Backup1: rev 0 to 99

Backup2: rev 100 to 154

Backup3: rev 155 to 199

Here is a sample from the SVNBook:

$ svnadmin dump myrepos -r 0:1000 > dumpfile1
$ svnadmin dump myrepos -r 1001:2000 --incremental > dumpfile2
$ svnadmin dump myrepos -r 2001:3000 --incremental > dumpfile3