hanj wrote:
> On Tue, 19 Sep 2006 08:20:44 +0000
> Keith Lofstrom <[EMAIL PROTECTED]> wrote:
> 
>> hanj wrote:
>>> This fires off at 3AM, which is great, but now I need to have dirvish
>>> run around 4PM for one particular server backup. I thought it would
>>> be easy creating a new master.conf file (master2.conf) in
>>> /etc/dirvish, and adding that argument to dirvish-runall with
>>> --config option and cron'ing my particular run time, but I'm not sure
>>> how to handle the dirvish-expire. I'm not seeing any configuration
>>> options for new config/alternative in the man page for
>>> dirvish-expire. Maybe I'm just going about this totally wrong. Any
>>> ideas?
>> On Tue, Sep 19, 2006 at 03:40:15PM +0100, Dave Howorth wrote:
>>> Does it matter when dirvish-expire runs? Why isn't it sufficient for it
>>> to do its job on all vaults at 3am?
>> I can't speak for hanj, but it is reasonable to run all the expires
>> at once.  However, hanj is not including the vault FOO in master.conf,
>> only in master2.conf, so dirvish-expire will not automatically run
>> vault FOO either.  That actually allows more freedom for hanj, because
>> the expire for vault FOO can be run at any time with:
>>     dirvish-expire --vault FOO
>> called from cron (or whatever).
>>
>> Note that master2.conf is not needed if there is just one vault getting
>> special treatment, you can do that with a separate shell script.
>>
>> If one wants more flexibility, and is not afraid of a little extra
>> script writing, it is not necessary to use dirvish-runall at all,
>> or list vaults in master.conf Runall and expect dirvish-expire to
>> find them.  You can call everything from shell scripts run by cron,
>> using "dirvish --vault FOO" and "dirvish-expire --vault FOO" for all
>> individual vaults.  Runall is just a convenience and a simplification
>> aid.   You can put as much complex behavior as you want into your
>> own shell scripts, including run times at any interval you want, and
>> dependent on system and network conditions and machine availability.
>>
>> However, you should keep it simple, and use the Runall section to
>> save time and confusion, if it will do the job.
>>
> 
> I think you're understanding 100%! So what you're saying ( I just need to 
> think out loud here ), is to maintain my current cron.daily/dirvish script 
> that does dirvish-expire and runall which will use my master.conf, but then 
> I'll create a separate bash script or crontab entry for my new 4PM vault 
> ('FOO' in your example).
> 
> 
> #! /bin/sh
> if [ -x /usr/sbin/dirvish ]
>               dirvish-expire --vault FOO; dirvish --vault FOO
> fi
> 
> 
> And I would exclude this from the Runall: list?
> 
> Thanks for the replies everyone!
> hanji
> _______________________________________________
> Dirvish mailing list
> [email protected]
> http://www.dirvish.org/mailman/listinfo/dirvish

Pretty close.  There's no particular need to run dirvish-expire on your
new 4pm vault twice a day unless you really want to.  A dirvish-expire
w/o any options looks in all your banks.

In other words:

dirvish-expire [at 3am]
dirvish-expire --vault FOO [at 4pm]

will expire FOO twice a day.

But it should work just fine as you've outlined.

Also this scheme starts to crumble if you ever want to add more vaults
to your new time slot.  The scheme I outlined doesn't; you just add
another line to the Runall: statement in the appropriate config file.
Obviously, only you can decide if ease of initial configuration or
future flexibility wins out.

--Jon Radel
_______________________________________________
Dirvish mailing list
[email protected]
http://www.dirvish.org/mailman/listinfo/dirvish

Reply via email to