Shell script to backup/restore an existing svn repository

Cd in to your svn repository path and create and run this script

#!/bin/bash<br></br>
for i in *<br></br>
do<br></br>
if [ "${i}" != "backupsvn.sh" ]; then<br></br>
echo "Dumping $i"<br></br>
svnadmin dump $i > /path/to/dump/$i<br></br>
else<br></br>
echo "Skipping $i"<br></br>
fi<br></br>
done```

In order to restore , go to your repository path and run the following script :

!/bin/bash

for i in *


do


if [ "${i}" != "restoresvn.sh" ]; then


echo "Creating $i"


svnadmin create $i


svnadmin load $i ```