Bacula-users

Re: [Bacula-users] How do counters work?

2011-06-20 18:57:28
Subject: Re: [Bacula-users] How do counters work?
From: Dan Langille <dan AT langille DOT org>
To: Stuart McGraw <smcg4191 AT frii DOT com>
Date: Mon, 20 Jun 2011 18:51:56 -0400
I;m posting this because nobody has answered you yet.  Perhaps my prompts will 
get you to supply additional information.  :)

On Jun 20, 2011, at 1:41 PM, Stuart McGraw wrote:

> So I am generating backup volumes limited in size 
> to fit on a DVD.  Since I use automatic volume labeling
> and some backups result in multiple volumes, I include
> a counter in the label name.  I want its value to be
> 1 for the first volume of the job, 2 for the second, 
> etc.

Well, that's not the purpose of counters.  Volume names are really for Bacula, 
not for humans.   Counters are there just to help with automated labeling of 
Volumes.

I suggest that discussion on whether or not we like this behavior that is 
outside the scope of this discussion.  :)

> First problem: counter does not get reset per job
> but only when director is restarted.  (This strikes 
> me as particularly useless behavior... is not the 
> most frequent (only?) use of counters in a label?

Just because a feature does not do what you want, does not make it useless. 
Clearly it was designed with a use case in mind.  :)

> Why would one want a value in a long-lived label
> dependent on an arbitrary event like a service 
> restart?  Maybe I am missing something). 

We have not seen your counter usage, so we cannot comment upon it. 

You didn't mention the docs, so perhaps these will help.

http://www.bacula.org/5.0.x-manuals/en/misc/misc/Variable_Expansion.html
http://www.bacula.org/5.0.x-manuals/en/main/main/Configuring_Director.html#SECTION0018190000000000000000

> So I specify a catalog and save the counter in the
> database.  I write a before job script to reset
> the counter to its minimumvalue.  
> 
> But although the script seems to be working, it has 
> no effect.  Even if I change the counter value in the 
> database by hand after the director has started but
> before running the job, the job uses the old counter 
> value.  Is it possible that the director reads the 
> counter value at startup, maintains it internally, 
> and only writes back to the database when its 
> incremented?

It is difficult to judge a script we have not seen.  :)

-- 
Dan Langille - http://langille.org


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>