[Dirvish] Creating Backups with image-default: %Y%m%d/%Y%m%d-%H_%M
Keith Lofstrom
keithl at kl-ic.com
Wed Aug 22 18:37:34 UTC 2007
On Wed, Aug 22, 2007 at 07:27:42PM +0200, Johannes Kastl wrote:
> Hello,
>
> I just tried to create backups of very often changing data. I wanted to
> create a backup every minute, but that way I get many directories. So I
> thought I would put them into
>
> 20070822/1930
> 20070822/1931
> 20070822/1932
> ...
>
> I went on and tried:
>
> image-default: %Y%m%d/%Y%m%d-%H_%M
>
> Which ended in an error, cos obviously dirvish does not use the -p
> Option of mkdir, so it cannot create more than one directory at once. It
> worked well after I manually created that directory, but tomorrow it
> will fail again.
>
> 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).
I run dirvish from a wrapper script I wrote for my own systems; it would
not be difficult to write a script like that to make the "20070822" daily
directories. It would also not be difficult to make a lot of daily
directories in advance, that are empty until used.
I will ask the local perlmonger's group if there is a good way to
replace the "mkdir" in the dirvish script with something that will do
"mkdir -p" properly, and that can go into a patch of dirvish, and a
future version of dirvish if enough dirvish users want to participate
to make that happen.
Keith
--
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