[Dirvish] Updating/overwriting existing images
dirvish at GMxTechnologies.com
dirvish at GMxTechnologies.com
Tue Aug 8 01:09:52 UTC 2006
Jason Boxman wrote:
> On Monday 07 August 2006 18:56, Samuel P Howard wrote:
>
>> Hi.
>>
>> I have a little script set up to automate the running of the "dirvish
>> --vault {foo}" jobs, and sometimes the client pushes a new dataset to
>> the staging area for dirvish to backup.
>>
>> However, the configuration is set up for only 1 image per day.
>>
>
> By choice or design?
>
Design. For most customers, there should only be 1 image per day,
however, if the push to the staging area fails part way through and has
to re-try/continue, or gets a manual update during the day, we need to
update the daily snapshot (image). Hence the desire to update an image,
not create another one.
>> So, is there an option for updating or overwriting an existing image? I
>> haven't been able to find it, but then again, I may be blind, too.
>>
>
> If you can produce more than one image a day, simply change the image
> directory to be something like %Y%m%d%H. Then you can run once an hour
> without an collision. Or you can include the minutes and seconds and run
> nearly as often as you need.
>
>
That would make the logic behind the restoration web interface *really*
ugly. Most customers are expecting to see a backup view with the
granularity of 1 day, not random dates and times. Other customers have
other levels of granularity, but none of them expect such randomness.
This is why I have set the default image format in the default.conf for
each customer. It makes implementation life much easier.
>> As an alternate, I thought of checking the return code, but the RC for
>> running a dirvish --vault for an image that already exists comes back
>> with RC=224.
>>
>> 224 is in the 220-254 range ("An error was detected in the
>> configuration."), which I wouldn't consider a very accurate description
>> of the reason for the failure.
>>
>> Something like "Image already exists" might be nice. :)
>>
>> The only option I currently see is to attempt the dirvish command, if it
>> fails with a 224, remove the existing directory and re-create it ...
>> somehow, I think that will bite me down the road with the indexes,
>> however. Also, since 224 is range that sounds more like the config file
>> is broken, I wonder what other conditions could return that error code?
>>
>
> If the image does exist, certainly you can check for that before running
> Dirvish? You can output the same date format using the `date` command as
> Dirvish uses, so you can check for existence ahead of time if you want.
>
> Unless I don't follow, you may be doing more work than you need to.
>
True, I could check for the existence of an image, but that would
require my parsing the config file myself to determine the date format,
and if an image *does* exist, that still doesn't help me unless I am
deleting and replacing, vs any sort of updating or refreshing of the
existing image. It just seems to me that dirvish should help
accommodate either updating an existing image, or rolling an existing
into a new image with the same name or something. Much like doing an
update on a ZIP file just adds in the updates in place.
Thanks,
Sam
More information about the Dirvish
mailing list