Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Back up Subversion repositories (See related posts)

Dump all Subversion repositories to a location of your choice. I run this as a backup_script from rsnapshot.

#!/bin/sh -e
###########################################################
# Back up Subversion repositories
###########################################################

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Subversion config
###########################################################

# My config
#SVN_DIR="/var/svn"
#BACKUP_DIR="."

SVN_DIR=""
BACKUP_DIR=""
SVN_REPOS=`ls $SVN_DIR`

# Dump repositories
###########################################################

for repos in $SVN_REPOS; do
    svnadmin dump --incremental --deltas --quiet $SVN_DIR/$repos \
        > $BACKUP_DIR/$repos
done

exit 0




You need to create an account or log in to post comments to this site.


Related Posts