Subversion movement…

Old server got a bad sector on the hard drive, so we are moving to a newer bigger disk!

This would have worked nicely (seen here):

Old machine:

sudo svnadmin dump /svn_old_path/reponame > svndump
scp svn_backup user@newmachine:/home/user/.

New machine:

sudo mkdir /svn
cd /svn
sudo svnadmin create svnrepo
sudo svnadmin load svnrepo < /home/user/svn_backup

but, we don’t have access to the machine running, since it does not boot past the bad sector. We also don’t trust the data and we do have access to the files by mounting the hard drive to another machine, so:

We went for the db4.2_recover approach first!

sudo db4.2_recover -c -h /media/baddrive/svnrepo

sudo svnadmin dump /media/baddrive/svnrepo > /home/user/svn_backup.bdb

sudo cat /home/gert/svn_backup.bdb | svnadmin load svnrepo

sudo svnadmin verify svnrepo

So don’t wait till the fan hits the wind! Backup (or dump) often!

sudo svnadmin dump /svn/svnrepo > svndump_`date +”%F”`.backup

to create svndump_2009-04-18.backup


~ by nambabwe on 2009/04/18.

%d bloggers like this: