Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I make a dump of a number of subversion repositories - with all repositories residing in one folder - on various operating systems (Linux shells, Windows 9x/Vista/XP/Server, etc.)?

I'll post an answer that works on Windows Server 2003 - but maybe there's a more elegant one for that, too.

(Additional background to the question here.)

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Bash:

#!/bin/bash
REPO_BASE=...
SVNADMIN=...

cd "$REPO_BASE"
for f in *; do
    test -d "$f"  &&  $SVNADMIN dump "$f" >"$f.svn"
done

(test -d makes sure to dump directories only)

share|improve this answer
add comment

This works on Windows 2003 server and is likely to work on other Windows OS's, too. It looks for any sub-directories in the specified "repos" directory and tries to run a svnadmin dump on each and every one of them. It creates dump files named (reponame).svn

dump_repos.bat

cd \my\subversion\repos
dir /A:D /B> dirs.tmp
FOR /F %%i IN (dirs.tmp) DO (
 "C:\path\to\subversion\bin\svnadmin.exe" dump %%i > %%i.svn
)
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.