[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Backup and Incremental Backup Perl Scripts

From: Thomas Moschny <moschny_at_ipd.uni-karlsruhe.de>
Date: 2005-05-19 15:30:12 CEST

> >can anyone please share any possible Perl (or even Python) scripts that
> > you or a colleague may have created to backup a Subversion repository
> > (including incremental scripts)?
> >
> >It would be a great help

That's what we use here:

-- snip --

#!/bin/bash

# discard standard error output [1]
exec 2> /dev/null

# args
REPOS="$1"
REV="$2"

postfix=$(printf "%05d" ${REV})
dirhash=$(printf "%02d" $((REV / 1000)) )
/bin/mkdir -p ${DUMPDIR}/${REPOS}/dumps/${dirhash}
/usr/bin/svnadmin dump ${REPOS} -r ${REV} --incremental \
  | /usr/bin/bzip2 --stdout \
> ${DUMPDIR}/${REPOS}/${dirhash}/dump.${postfix}.bz2

-- snip --

[1] before we added this, we sometimes saw hanging post-commit-hook scripts.

Regards,
Thomas

  • application/pgp-signature attachment: stored
Received on Thu May 19 15:35:12 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.