Bug 628694 - Labeling volumes: when using variable in label format, volume number is missing
Labeling volumes: when using variable in label format, volume number is missing
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: bacula (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Andreas Thienemann
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-30 15:32 EDT by Michal Bruncko
Modified: 2010-11-24 10:37 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-24 10:37:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Michal Bruncko 2010-08-30 15:32:32 EDT
Description of problem:
When I use in Pool directive "Label Format" something like this: Label Format = "${Client}-Configuration-Vol", bacula have'nt appended volume number at the end of label format in backup process. I am using fresh installation of bacula with postgresql with empty database and I was trying this as first job (id=1).
From director report (snip):
...
30-Aug 20:55 bacula-dir JobId 1: Start Backup JobId 1, Job=apollo-Configuration.2010-08-30_20.55.53_03
30-Aug 20:55 bacula-dir JobId 1: Created new Volume "apollo-Configuration-Vol" in catalog.
30-Aug 20:55 bacula-dir JobId 1: Using Device "FileStorage"
30-Aug 20:55 bacula-sd JobId 1: Labeled new Volume "apollo-Configuration-Vol" on device "FileStorage" (/var/backup).
30-Aug 20:55 bacula-sd JobId 1: Wrote label to prelabeled Volume "apollo-Configuration-Vol" on device "FileStorage" (/var/backup)
30-Aug 20:55 bacula-dir JobId 1: Volume used once. Marking Volume "apollo-Configuration-Vol" as Used.
...

backup was completed successfuly, but I missed volume number after label, something like this: "apollo-Configuration-Vol0001"

When I try to backup apollo client without using variable expansion in Label Format directive (Label Format = "Configuration-Vol"), volume number is appended correctly (but in this case, without client name): "Configuration-Vol0001".


Part of configuration:
Pool {
  Name = Configuration
  LabelFormat = "${Client}-Configuration-Vol"
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 28 days
  Recycle Oldest Volume = yes
  Maximum Volumes = 450
  Maximum Volume Jobs = 1
  Use Volume Once = yes
}
JobDefs {
  Name = "ConfigurationJob"
  Type = Backup
  FileSet = "Configuration"
  Schedule = "WeeklyCycle"
  Storage = sd-backup
  Pool = Configuration
  Messages = Standard
  Where = /tmp/bacula-restores
  Write Bootstrap = "/var/spool/bacula/%c.bsr"
}
Job {
  Name = "apollo-Configuration"
  Type = Backup
  Client = apollo
  JobDefs = "ConfigurationJob"
}

Is this correct behaviour? I am using this "configuration" pool for multiple clients and I want to differentiate between volumes by its labels (client and volumenumber names).


Version-Release number of selected component (if applicable):
bacula-director-postgresql-5.0.2-5.fc13.x86_64
bacula-storage-common-5.0.2-5.fc13.x86_64
bacula-console-5.0.2-5.fc13.x86_64
bacula-client-5.0.2-5.fc13.x86_64
bacula-common-5.0.2-5.fc13.x86_64
bacula-director-common-5.0.2-5.fc13.x86_64
bacula-storage-postgresql-5.0.2-5.fc13.x86_64

How reproducible:
always

Steps to Reproduce:
1. in description above
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Jan Görig 2010-11-24 10:37:20 EST
This behaviour is correct. Please see bacula manual (http://www.bacula.org/5.0.x-manuals/en/main/main/Configuring_Director.html#Label).

If you want to use Variable expansion and counter, you must define counter explicitly in Counter resource.

But as written in manual, Label format is deprecated and should by replaced by Python scripting.

Note You need to log in before you can comment on or make changes to this bug.