[Dirvish] Run post script depending on success/failure?

Chris Dunning chris at bluenoteweb.com
Thu Dec 22 02:42:41 EST 2005


It's nearly 2 AM and I haven't had much coffee, forgive me if I'm 
incoherent.

I'm using Dirvish to back up several machines, some of which are not 
always accessible at backup time because they are either roaming laptops 
or were powered off when the cron script ran.  My personal laptop, for 
example, has been in the shop for nearly three weeks to replace a blown 
motherboard.  When I've gone back into the backups to find old files, 
I've come across lots of directories with nothing but a log since the 
backup did not successfully complete.  I'd like to do one of two things 
with these directories:

Ideally, delete them.  I realize that the presence of the directory 
tells me that dirvish did run and attempted to backup that particular 
machine.  However, the email that I receive when the cron finishes tells 
me the same thing.  I don't think this is particularly necessary.

If that's not possible (or inadvisable for some reason), have a symlink 
to the most recent backup that successfully completed (ie, 
/vault/branch/current).  I could use a post-script for this, but I don't 
see a way in the docs to run a post-script only on success.

As a hack I suppose I could run a cleanup script on a cron that would go 
through the directories and delete anything without a "tree" 
subdirectory...but that really seems like a hack.

Any advice?


More information about the Dirvish mailing list