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

RE: Re: => Backup ?

From: Anthony Muller <Anthony.Mueller_at_hyperoffice.fr>
Date: 2006-09-01 10:55:55 CEST

Great!!!

Thanks!

----------------------------------------------
Anthony MÜLLER
HyperOffice
E-learning Company
www.hyperoffice.fr
----------------------------------------------
email : anthony.muller@hyperoffice.fr
----------------------------------------------

-----Message d'origine-----
De : Andy Peters [mailto:devel@latke.net]
Envoyé : vendredi 1 septembre 2006 04:30
À : Subversion Users
Objet : Re: => Backup ?

On Aug 31, 2006, at 8:25 AM, Anthony Muller wrote:

> Hello,
>
> What is the simple way to make a repository backup in order to do a
> full restore later (if a problem occurred)?
>
> Is "hotcopy" the best way?

here's a shell script I cooked up.

It assumes the repo is stored in /Volumes/Repodisk/svnowner/svnroot
and hotcopies it to a new directory called /Volumes/Repodisk/svnowner/
svnroot_backup/$DATE. It then tar-gzs the backup. Finally, it scps
it to another machine on the network. Works fine on Mac OS X.
You'll need to make sure your ssh-agent is running.

#!/bin/bash

BASE=/Volumes/Repodisk/svnowner
DATE=`date +%Y%m%d%H%M%S`
SVNROOT=$BASE/svnroot
SVNBKUP=$BASE/svnroot_backup/$DATE
ZIPPED=$BASE/svnroot_backup/$DATE.tar.gz
SCPDEST="svnowner@slug:~/svnroot_backups/"
echo $SCPDEST

echo "Starting svnadmin hotcopy:"
svnadmin hotcopy $SVNROOT $SVNBKUP
echo "Starting archive process:"
tar -cvzf $ZIPPED $SVNBKUP
echo "Copying archive over network:"
scp $ZIPPED $SCPDEST
echo "Done!"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Sep 1 10:57:54 2006

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.