[Dirvish] Backup multiple server at the same time
Jon Radel
jon at radel.com
Fri Feb 8 17:36:59 UTC 2008
Red Mop wrote:
>
> In your case, I would make a single cron entry for dirvish-expire at, say,
> 8pm , then at 9pm or so, run 'dirvish --vault (vaultname) for each vault. I
> would avoid trying to run more than one vault at a time on any given backup
> client to prevent disk thrashing and to minimize resource usage.
An alternate method I use to great success is:
master.conf contains all the general config information (bank: some
exclude: information, default expire) but no Runall:, and then I have a
number of additional *.conf files which contain only Runall:
I then call dirvish-runall referring to the appropriate config file as in:
#!/bin/sh
# $Id: dirvish-nightly,v 1.1 2008/01/25 05:16:36 root Exp $
PATH=/usr/bin:/bin:/usr/local/sbin:/usr/local/bin
export PATH
echo -e "Expire all vaults\n"
/usr/local/sbin/dirvish-expire
echo -e "\n\nRun vaults for $1 nights\n"
/usr/local/sbin/dirvish-runall --config ${1}-day.conf
echo -e "\n\nCurrent state of backup disk space:\n"
df -h | grep backup
which is called from crontab suchlike:
# Make dirvish backups
3 6 1-31/2 * Sun /usr/local/sbin/dirvish-nightly odd
43 6 2-30/2 * Sun /usr/local/sbin/dirvish-nightly even
I can second the suggestion that you take a bit of care when overlapping
jobs. For example, if you look at my crontab entries you'll note that
on Sunday's I back both sets of vaults, and run dirvish-expire twice.
If I actually run 2 instances of dirvish-expire at the same time, they
get into a race situation, and I get lots and lots of error messages
about how files disappeared just before they were going to be deleted.
The 40 minute delay exceeds the time it takes to run dirvish-expire by a
wide margin.
(If you're curious about the why of my setup... I have two backup
servers in two different cities which essentially take turns backing up
the different vaults, except on Sundays, when they both backup
everything, and set it to a longer expire time. I don't much care if
the client disks thrash a little bit at 2am local time on Sunday.)
--Jon Radel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2890 bytes
Desc: S/MIME Cryptographic Signature
Url : http://www.dirvish.org/pipermail/dirvish/attachments/20080208/68d2b04e/attachment-0001.bin
More information about the Dirvish
mailing list