View Issue Details

IDProjectCategoryView StatusLast Update
0001132bareos-coredocumentationpublic2023-08-02 15:02
Reporterembareossed Assigned Tobruno-at-bareos  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionwon't fix 
PlatformLinuxOSDebianOS Version9
Product Version17.2.4 
Summary0001132: How to make Counter Resources increment
DescriptionBareOS Counter Resources do not automatically increment themselves; this must be done by nudging the corresponding counter variable appropriately. In addition, one must know the exact syntax to to use.

Merely creating a tape label with, e.g.:

Label Format = "DIFF-$DiffSeq"

does NOT increment the value of "DiffSeq," which will cause backups to error and send annoying intervention emails. The error indicates that the director could not find an appendable volume.

There does not appear to be documentation on how to actually use counter variables corresponding to Counter Resources. I searched high and low for hours and only discovered the solution by examining a google hit on Bacula, not BareOS. Apparently, Bacula has some sophisticated facilities for generating tape labels from counter variables; I have not tried them all. However, the Bacula documentation on this topic was enough (along with my own experience and knowledge of *nix-type systems) to help me figure out how to do something similar in BareOS. I changed the directive to:

Label Format = "DIFF-${DiffSeq+}"

Note that the plus sign (the '+') MUST be INSIDE the curly braces. I have not tried padding and other features the Bacula documentation discusses as I feel I have spent enough time on this already. I use "faux" padding by starting my sequences in the Counter Resource at 1000; this is satisfactory for my own use. Others might try experimenting with some other features, if they are implemented in Bareos also.

BTW, Counter Variables really do work in BareOS. The secret is knowing exactly how to use them.

The Bacula doc on this topic is at: https://www.bacula.org/9.0.x-manuals/en/misc/Variable_Expansion.html

I think an update to the BareOS documentation on the use, very specifically, of counter variables would be appropriate.

Steps To ReproduceCreate a Counter Resource and reference it with a simple shell-like substitution like $CounterVariable.
TagsNo tags attached.

Activities

embareossed

embareossed

2019-11-06 11:20

reporter   ~0003614

Incidentally, if this is fixed in post-17.2 releases, do not immediately close this issue. The webui in 18.2 has some serious defects. Short of using a mix of 17.2 serverware and 18.2 webui clientware (which may be a bit of a configuration hassle on some platforms depending on packaging system), using BareOS 18.2 at this time is not possible. Production shops, and many users preferring stability over cutting edges, could well decide to avoid nightlies.

Please leave this open so others can see they are not losing their minds. Thanks.
bruno-at-bareos

bruno-at-bareos

2023-08-02 15:02

manager   ~0005307

Changes will not happen without a community PR proposal. Be noticed that Volume Label variable expansion will goes deprecated soon as they are often misused.

Issue History

Date Modified Username Field Change
2019-11-06 11:12 embareossed New Issue
2019-11-06 11:20 embareossed Note Added: 0003614
2023-08-02 15:02 bruno-at-bareos Assigned To => bruno-at-bareos
2023-08-02 15:02 bruno-at-bareos Status new => closed
2023-08-02 15:02 bruno-at-bareos Resolution open => won't fix
2023-08-02 15:02 bruno-at-bareos Note Added: 0005307