How to continue a load that has failed in Subversion
Asked Answered
S

1

5

I have started to load a subversion dump into a repository. Before it could finish, I exhausted my quota and the command stopped

<<< Started new transaction, based on original revision 327 * editing path : XXX/YYY/Makefile ... done. svnadmin: Can't write to file '/XXX/db/txn-protorevs/2738-24o.rev': Disk quota exceed

I have asked for more quota but now I am not sure how to continue the import. Should I simply redo the same command ?

svnadmin load --parent-dir Software/xxx_modules /XXX/YYY < ~/xxx.svn.dmp

Or is there a way to restart the import at the revision where it failed (327) ?

Sobriety answered 3/4, 2013 at 7:2 Comment(3)
Do you know that the quota will be expanded enough for your repository to fit?Cementation
yes, I do, I can ask any size actually.Sobriety
Would have added as a comment to Barth's answer but I lack the rep :( Barth's answer worked for me except I only needed to dump the first two lines of the full dump file before tailing the remainder of the original dump file. So: # Move the first 2 lines of the dump to new file head -2 ~/xxx_modules.svn.dmp > partial.dump ... continue as before ... In other words, cat the first 10 or so lines of your dump file to get an idea of the structure and then add whatever the preamble consists of to the partial before tailing the remainder of the dump file.Troup
S
9

Here is how I did it in the end. Knowing that the load failed when importing revision 327 :

# Move the first 4 lines of the dump to new file
head -4 ~/xxx_modules.svn.dmp > partial.dump

# Find out where is the beginning of revision 327 that failed
grep -n "Revision-number: 327" ~/xxx_modules.svn.dmp

# Copy content of dump from that line (change X)
tail -n +X ~/xxx_modules.svn.dmp >> partial.dump

# Load using this partial dump
svnadmin load --parent-dir Software/xxx_modules /xxx/zzz/ < partial.dump
Sobriety answered 3/4, 2013 at 13:56 Comment(1)
Ran into the same problem, but did this instead: xz -cd mysvndump.xz | awk '$0=="Revision-number: 5124" {p=1} NR<=4 || p' | svnadmin load /svn/dir/. Saves some space when the dump is over 1GiB (but less than 50MiB when compressed with xz).Erdda

© 2022 - 2024 — McMap. All rights reserved.