[Dirvish] Updating/overwriting existing images
Jason Boxman
jasonb at edseek.com
Tue Aug 8 03:08:44 UTC 2006
On Monday 07 August 2006 22:47, Samuel P Howard wrote:
> <stuff>
>
> > No, I don't believe it should.
> >
> > Snapshots are point-in-time. That it cannot be later updated should be
> > considered a feature. By definition it isn't a backup if it's subject to
> > change at anytime
>
> I was under the impression that Dirvish was designed to be a backup
> tool, not just a point-in-time snapshot utility.
You may not agree with my opinion of how a snapshot should work, but in this
instance the tool does work the way I explained. Fortunately you have the
source in your hands.
> So, based on your feature, if a dirvish image creation fails 99%
> complete, your solution is to destroy the entire image and run the whole
> job over? That seems a bit inefficient, doesn't it? After all, the one
> of the best features of the underlying rsync tool is to *not* do painful
> things like that, isn't it?
It seemed as if your objective was to overwrite a existing snapshot if needed
so you don't have to munge a Web UI or confuse users.
If you're actually trying to avoid wasting bandwidth, that's a different
discussion.
In either case, Dirvish doesn't support recovering a failed snapshot
automatically. You can, however, grab the summary line from the summary file
which includes the full `rsync` command used to build your image. Rerun that
and you'll avoid wasting any bandwidth. Note that such action is a manual
step on your part that you'll have to automate outside Dirvish.
> In any case, this just ends up in a religious argument, and I'm not very
> interested in getting into one of those. The end result is that I have
> no clean solution to my problem, and have to fall back on either hacking
> Dirvish (not really what I want to do), or brute force destroy and
> re-create (not exactly what I want to do, either).
Yes, that's correct.
> For now, the brute force method is really my only short term
> implementation option, so now I have to figure out how to manually
> expire an image so that the indexes get cleaned up properly ... I am
> assuming that the dirvish-expire process cleans up indexes ... does it?
`dirvish-expire` will remove snapshots that are scheduled for expiration,
including any index that might exist in directories that are set to expire.
I'm fairly certain you're on your own for failed snapshots. You can always
`grep` for 'failed' in the summary file and nuke any snapshot you don't want
to resume using the method mentioned above.
Really, I don't think you should have much code to write here.
--
Jason Boxman
http://edseek.com/ - Linux and FOSS stuff
More information about the Dirvish
mailing list