[Dirvish] Creating Backups with image-default: %Y%m%d/%Y%m%d-%H_%M

Jon Radel jon at radel.com
Wed Aug 22 18:15:24 UTC 2007

Johannes Kastl wrote:

> How to solve that? How to tell dirvish to create two directories the
> first time it runs on a day (e.g. 20070822 and 20070822/1930 need to be
> created).

Two solutions occur to me.

Elegant, but scary until properly tested:  Add "-p" to the mkdir call in 
dirvish.  I've not looked at the source code, but I suspect there's a 
good chance it won't break anything.

Less elegant, but also less scary:  Run a cron job a midnight (or 
slightly before if worried about race condition, but that makes the 
script a bit less trivial) that creates the base directory for that day 

--Jon Radel

More information about the Dirvish mailing list