[svk-users] What to do when a db/revs/nnn file is sitting on a
bad sector
Jared Hardy
jaredhardy at gmail.com
Mon Oct 15 20:29:04 EDT 2007
> Jared Hardy wrote:
> > One hacky way around this might be to mirror a new .svk repository
> > from your old one, and use "svk sync --torev 1576 ..." to stop it
On 10/14/07, David Landgren <david at landgren.net> wrote:
> Umm, how exactly do I do this? Bearing in mind that I mirror a number of
> different remote repos. As luck would have it, the lost revisions belong
> to a single repo.
> svk depotmap --list says that depot // has a path of /home/david/.svk/local
Maybe try something like this (don't take my word verbatim -- I
haven't tested this):
mv /home/david/.svk/local /home/david/local-bad
svk depotmap --init /home/david/.svk/local
# OR (-- not sure which works best here)
svnadmin create /home/david/.svk/local
svnadmin dump -r 0:1576 file:///home/david/local-bad > local-bad.dump
svnadmin load --force-uuid /home/david/.svk/local < local-bad.dump
This is different from my first "mirror the mirror" suggestion. I
realized that could be very difficult if you're mirroring from
multiple remote repository sources.
These steps actually move your current svk/svn repository, and
make an svn dumpfile from it, stopping at revision 1576. Then you
create a new svn repository in the same place, and load all your old
data into it from the dumpfile. This is using svnadmin to recreate the
same svk repository, stopping at rev 1576.
BTW, you can use the "svnadmin dump" command to backup your svk
repository on a regular basis too, or "svnadmin hotcopy" for verbatim
folder copies. The dumpfiles tend to be about 3x the size of the
original repository, so make sure you have plenty of disk space free.
Maybe you can mount a USB or network drive, and create the
dumpfiles/backups there.
:) Jred
More information about the svk-users
mailing list