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.You were just missing a one parameter. To make an incremental backup you should use the
incremental
parameter.So your base dump would be:
And when you need an update you do this:
And you can restore with:
You only need to be sure that
repo1.dmp
ends whererepo2.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.