How to continue a load that has failed in Subversion

蓝咒 提交于 2019-12-10 14:22:24

问题


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) ?


回答1:


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


来源:https://stackoverflow.com/questions/15780864/how-to-continue-a-load-that-has-failed-in-subversion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!