Posts Tagged “subversion”

We’re using Subversion to manage files for all of our projects in the Teaching & Learning Centre. More projects means more Subversion repositories to backup. Instead of maintaining a list of projects and repositories, we stick all repositories in a common root directory, and I’ve just put together a dead simple script to automatically dump all of them to a directory of my choosing. I’ve added this script to the crontab for the www user on the server, and it runs svndump on all repositories, gzipping the output for archive (and possibly restore).

The output is stored in a specified backup directory, which is then picked up via rsync from my desktop Mac, and copied to the external backup drive.

#!/bin/sh

SVN_REPOSITORIES_ROOT_DIR="/svn_repositories/"
BACKUP_DIRECTORY="/Users/Shared/backup/svn/"

for REPOSITORY in `ls -1 $SVN_REPOSITORIES_ROOT_DIR`
do
echo 'dumping repository: ' $REPOSITORY
/usr/local/bin/svnadmin dump $SVN_REPOSITORIES_ROOT_DIR$REPOSITORY | gzip > $BACKUP_DIRECTORY$REPOSITORY'.gz'
done

Comments 7 Comments »

Julian and I were just IMing about how to set up a new Subversion repository - and we both commented about how this process should be documented. King set one up last week, and we said the same thing then.

So, I bit the bullet, and wrote up a first draft of the documentation for the process of creating a new Subversion repository for a Learning Commons project.

I left a page to list all documentation for the Learning Commons, in case the idea takes off and others start doing it…

I’ve used wikis to store “spontaneous documentation” before - but I’m hoping to keep the wiki as part of the formal documentation process. We’re about to head into another Learning Commons website rethink, so it might make sense.

Comments No Comments »

Creative Commons License
This work is licensed under a Creative Commons Attribution 2.5 Canada License.