[Dirvish] Saving default.conf files

Keith Lofstrom keithl at kl-ic.com
Thu Jun 9 14:37:27 UTC 2005

On Thu, Jun 09, 2005 at 11:42:32AM +0100, Dave Howorth wrote:

> I just discovered the need for a small utility to backup all my 
> 'default.conf' files because otherwise that information is only stored 
> in one place and could go missing! ...

Another way to do this is tar.  I have all my vaults on one backup
disk (which I do a 3 way rotate on) so this is easy for me, but some
elaboration for other setups is easily possible.

My backup disk structure is like so:

Where "/backup" is the mount point.  Every night, as part of the
bash script I use to wrap dirvish-runall, I do:

   tar -cfp /etc/dirvish/disks/$DISK  /backup/dirvish/*/*/dirvish

This saves all the default.conf (and branch) metadata on the drive. 
Multiple banks on different disks could be easily handled, because
tar can take multiple arguments.

Since I rotate disks, and sometimes add a new disk to the rotation,
I use tar to very quickly set up new disks.  Generally, all I have
to do is format the new drive, do a tar -xfp , chmod some of the
global permissions, then write a label file (from which I extract
the $DISK parameter above).  This takes about 3 minutes, of which
2 minutes are used remembering what to do.

I do like the idea of handling this in Perl, though, because overall
I would like to eliminate dependencies on bash.  Perhaps my wrapper
ought to be written in Perl, and capable of locating utilities like tar.


Keith Lofstrom          keithl at keithl.com         Voice (503)-520-1993
KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs

More information about the Dirvish mailing list