Reputation: 22696
CentOS 5.3
I have a directory called repos. Inside that directory I have repositories and subdirectories of repositories. There are more than 30 repositories in all.
We are now moving our repositories to another server. I am just wondering what is the best way to copy all the repositories.
I have looked at svnadmin dump and hotcopy. However, I would like to copy all the repositories recursively. I am not sure that dump and hotcopy allow you to copy all the directories.
I could use hotcopy. However, that would take forever if I have to do them one at a time.
Would it be safe to do a just a normal file copy i.e. scp -r source dest
Many thanks for any suggestions,
Upvotes: 0
Views: 110
Reputation: 22696
I found another way.
Which is using rsync. That is what I did and it worked ok.
rsync -rcaz -e ssh [email protected]:/svn_repos [email protected]:/svn_repos
Upvotes: 0
Reputation: 7711
I could use hotcopy. However, that would take forever if I have to do them one at a time.
You can try to use bash scripting:
for d in /srv/svnroot/* ; do svnadmin dump $d | ssh targetserver svnadmin load $d ; done
Where /srv/svnroot
is your directory with the svn repositories and targetserver
you new server.
I would not really recommend scp
, it works only with FSFS repositories and you have to make sure that nobody can access them while you copy.
Upvotes: 1
Reputation: 1446
Yes you can very well do a scp from source to destination. you might just need to make the appropriate configuration/commandline changes while starting svn.
Upvotes: 1