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

Re: repository on client is newer than on server as a result of server hd failure

From: Kris Deugau <kdeugau_at_vianet.ca>
Date: 2006-02-09 16:50:45 CET

Jon Scott Stevens wrote:
> If the data is so crucial, then why not use RAID to mirror the drive?
> Seems like a much better system from a performance perspective.

RAID does not protect against (accidentally) Doing Something Dumb.

It just protects against hardware-level faults on the physical disks.

My own personal repos have no backups in place at the moment, but the
ones I set up for work have a daily full backup. (They're small.) I
keep 14 days of daily backups.

I actually back up a number of things in the same script; here's an
extract with the subversion bits:

=====
#!/bin/sh

curdate=`date +%Y%m%d`
olddate=`date -d '14 days ago' +%Y%m%d`

# Back up Subversion repos

for repo in repo1 repo2; do
   # Dump repo
   echo "Dumping $repo..."
   /usr/bin/svnadmin -q dump /svnroot/$repo | gzip > \
        /backups/svn-$repo-$curdate.gz

   # Delete old repo backup. Keep 14 days' changes.
   rm -f /backups/svn-$repo-$olddate.gz

   # Get admin area
   tar -c /svnroot/$repo/{conf,hooks} |gzip > \
        /backups/svn-$repo-conf.tar.gz
done
=====

The backup destination is actually an NFS mount to another system in the
real script, mounted and unmounted within the script.

If I were working with much larger repositories, I'd likely do a weekly
full dump, and daily incrementals (or per-commit incrementals that get
copied to the backup NFS mount on a daily basis).

-kgd

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Feb 9 18:11:47 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.