move svn repository with revisions

When moving your favorite svn repository from Server A to Server B there are several possibilities. I use the following way which I think is the best.

1. Create a dump

svnadmin dump your_repository/ > your_repository.svn.dump

2. Somehow transfert your ‘dump’ file to the Server B

3. Create new svn repository on Server B

svnadmin create your_repository

4. Load your dump

svnadmin load your_repository < your_repository.svn.dump

that’s it

#move more than one svn repository at once
for repo in $(ls /home/web/svn)
do
svnadmin dump $i/ > $i.dump
scp $i.dump cb0@ServerB:/svn/
ssh -t cb0@ServerB svnadmin create /svn/$i
ssh -t cb0@ServerB svnadmin load /svn/$i < /svn/$i.dump
done