I don't understand the reason for this warning:

WARNING 0x0000: Referencing data in revision 6882, which is older than the oldest dumped revision (r7001). Loading this dump into an empty repository will fail.

I'm trying migrate an old repository to a new server via a dump/load cycle.

I thought this would be a good opportunity to get rid of some of the oldest revisions, so I used this command:

svnadmin dump -r7001:HEAD C:\svnrepo > C:\temp\repo.dmp

I was expecting the dump to collect all necessary "base info" into the first dumped revision. How can I get rid of the old revisions?


svnadmin dump just dumps the content into a svn-readable format to re-perform the commits done in the source repository. There is no "mangling" to make the data fit in a new repository.

Your command will "squish" the first 7000 revisions into 1 and then continues to cperform every commit as it was done in your source repo.

However somewhere you have a copy operation asking for a file(path in your output) from revision 6882. So if you load this dump it tries to access revision 6882 (which is not existant) and will fail. This is the meaning of this warning.

What to do? You need to use svndumpfilter to mangle the dump. This means you need to examine the whole svn log and check where it references files from revisions earlier than 7001, and remove these paths from the dump. If you need these files, you are out of luck with conventinal tools and may try to edit the dumpfile manually.

  • Thanks for the background. In my opinion, this renders that command completely useless. I don't get why the copy operation doesn't use the 'squished' revision. Anyway, I gave up after wasting 2 days and just dumped the whole repo. – Reto Höhener Apr 5 '18 at 5:47
  • @Zalumon: I understand that it is not usable in your usecase. But the dump format was invented to safely transport (and update ) repositories. It was not for squishing revisions (although you sometimes can use it for this). – Peter Parker Apr 5 '18 at 9:37

You were just missing a one parameter. To make an incremental backup you should use the incremental parameter.

So your base dump would be:

svnadmin C:\svnrepo dump -r0:7000 > C:\temp\repo1.dmp

And when you need an update you do this:

svnadmin C:\svnrepo dump -r7001:HEAD --incremental > C:\temp\repo2.dmp

And you can restore with:

svnadmin load c:\newrepo < C:\temp\repo1.dmp
svnadmin load c:\newrepo < C:\temp\repo2.dmp

You only need to be sure that repo1.dmp ends where repo2.dmp starts.

See more in the documentation: http://svnbook.red-bean.com/en/1.6/svn.reposadmin.maint.html#svn.reposadmin.maint.migrate

You could also use svnsync if you want to keep a read-only copy of the repo. You don't have to remeber what is your last revision then. But you would need to prepare your repo for sync.

  • Thanks, but the goal was to get rid of the old versions. Incremental backups still need them. – Reto Höhener Jun 5 '20 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.