View Issue Details

IDProjectCategoryView StatusLast Update
0001475bareos-coredirectorpublic2022-08-03 14:13
Reportergrd Assigned Tobruno-at-bareos  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformLinuxOSDebianOS Version10
Product Version21.1.3 
Summary0001475: Wrong volume name
DescriptionHello. Have a configuration when every job has a separate volume with a config:

Pool {
  Name = Full
  Pool Type = Backup
  Maximum Volume Jobs = 1
  Recycle = no # Bareos can automatically recycle Volumes
  AutoPrune = yes # Prune expired volumes
  Volume Retention = 35 days # How long should the Full Backups be kept?
  Label Format = "Full-${JobId}-${Job}.dat" # Volumes will be labeled "Full-<volume-id>"
}

Pool {
  Name = Differential
  Pool Type = Backup
  Maximum Volume Jobs = 1
  Recycle = no # Bareos can automatically recycle Volumes
  AutoPrune = yes # Prune expired volumes
  Volume Retention = 35 days # How long should the Differential Backups be kept?
  Label Format = "Differential-${JobId}-${Job}.dat" # Volumes will be labeled "Differential-<volume-id>"
}

As result I have a *.dat files like:
-rw-r----- 1 bareos bareos 17M Jul 29 21:51 Full-125-BackupCatalog.dat
-rw-r----- 1 bareos bareos 55M Aug 1 20:00 Full-155-backup-bareos-fd.dat
-rw-r----- 1 bareos bareos 55M Aug 2 07:50 Full-162-backup-bareos-fd.dat

If I cancel a job from WebUI next job will be written on the incorrect volume.
For example, I cancel job 198 and job 200 write in 198 volume:

Job 198:
15 2022-08-03 11:56:31 bareos.dcsig JobId 198: Fatal error: No Job status returned from FD.
14 2022-08-03 11:56:31 bareos.dcsig JobId 198: Fatal error: Network error with FD during Backup: ERR=Resource temporarily unavailable
13 2022-08-03 11:56:31 bareos.dcsig JobId 198: Fatal error: Client "*filtered*" RunScript failed.
12 2022-08-03 11:56:31 bareos.dcsig JobId 198: Fatal error: Socket error on RunBeforeNow command: ERR=Resource temporarily unavailable
11 2022-08-03 11:56:28 bareos.dcsig JobId 198: Fatal error: Director's comm line to SD dropped.
10 2022-08-03 11:56:01 cerb6.dcsig JobId 198: ClientBeforeJob: mysqldump: [Warning] Using a password on the command line interface can be insecure.
9 2022-08-03 11:56:01 cerb6.dcsig JobId 198: shell command: run ClientBeforeJob "*filtered*"
8 2022-08-03 11:56:01 cerb6.dcsig JobId 198: Connected Storage daemon at *filtered*9103, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
7 2022-08-03 11:56:01 bareos.dcsig JobId 198: Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
6 2022-08-03 11:56:01 bareos.dcsig JobId 198: Handshake: Immediate TLS
5 2022-08-03 11:56:01 bareos.dcsig JobId 198: Connected Client: *filtered* at *filtered*:9102, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
4 2022-08-03 11:56:01 bareos.dcsig JobId 198: Using Device "FileStorage" to write.
3 2022-08-03 11:56:01 bareos.dcsig JobId 198: Created new Volume "Differential-198-rms08.dat" in catalog.
2 2022-08-03 11:56:01 bareos.dcsig JobId 198: Connected Storage daemon at *filtered*:9103, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
1 2022-08-03 11:56:01 bareos.dcsig JobId 198: Start Backup JobId 198, Job=rms08.2022-08-02_22.00.01_06

Job 200:
16 2022-08-03 11:57:34 bareos.dcsig JobId 200: Insert of attributes batch table done
15 2022-08-03 11:57:34 bareos.dcsig JobId 200: Insert of attributes batch table with 4374 entries start
14 2022-08-03 11:57:34 rms52 JobId 200: Elapsed time=00:00:01, Transfer rate=2.187 M Bytes/second
13 2022-08-03 11:57:33 rms52 JobId 200: Releasing device "FileStorage" (/var/lib/bareos/storage).
12 2022-08-03 11:57:33 vps873.dcsig JobId 200: shell command: run ClientAfterJob "*filtered*"
11 2022-08-03 11:57:33 bareos.dcsig JobId 200: Max Volume jobs=1 exceeded. Marking Volume "Differential-198-rms08.dat" as Used.
10 2022-08-03 11:57:33 rms52 JobId 200: Wrote label to prelabeled Volume "Differential-198-rms08.dat" on device "FileStorage" (/var/lib/bareos/storage)
9 2022-08-03 11:57:33 rms52 JobId 200: Labeled new Volume "Differential-198-rms08.dat" on device "FileStorage" (/var/lib/bareos/storage).
8 2022-08-03 11:57:33 vps873.dcsig JobId 200: ClientBeforeJob: mysqldump: [Warning] Using a password on the command line interface can be insecure.
7 2022-08-03 11:57:33 vps873.dcsig JobId 200: shell command: run ClientBeforeJob "*filtered*"
6 2022-08-03 11:57:32 bareos.dcsig JobId 200: Encryption: None
5 2022-08-03 11:57:32 bareos.dcsig JobId 200: Handshake: Cleartext
4 2022-08-03 11:57:32 bareos.dcsig JobId 200: Connected Client: *filtered* at *filtered*:9102, encryption: None
3 2022-08-03 11:57:32 bareos.dcsig JobId 200: Using Device "FileStorage" to write.
2 2022-08-03 11:56:32 bareos.dcsig JobId 200: Connected Storage daemon at *filtered*:9103, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
1 2022-08-03 11:56:32 bareos.dcsig JobId 200: Start Backup JobId 200, Job=vps873.2022-08-02_22.00.01_08
Steps To Reproduce1) Cancel job from WebUI
2) Wait for a new job
TagsNo tags attached.
bareos-master: impact
bareos-master: action
bareos-19.2: impact
bareos-19.2: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action

Activities

grd

grd

2022-08-03 12:52

reporter   ~0004707

I can reproduce it if no files are written in volume in a first job
bruno-at-bareos

bruno-at-bareos

2022-08-03 14:12

developer   ~0004708

If no job is written to the volume, this one is still valid (append mode) ready to be use by the next job.
Your assumption is wrong.

If you want to do the volume management by hand you will have to provide mechanism in all case the software will encounter.
Here you need something that change the VolumeStatus to Full (runscript after when failed).
bruno-at-bareos

bruno-at-bareos

2022-08-03 14:13

developer   ~0004709

Misunderstanding usage.

Issue History

Date Modified Username Field Change
2022-08-03 12:37 grd New Issue
2022-08-03 12:52 grd Note Added: 0004707
2022-08-03 14:12 bruno-at-bareos Note Added: 0004708
2022-08-03 14:13 bruno-at-bareos Assigned To => bruno-at-bareos
2022-08-03 14:13 bruno-at-bareos Status new => closed
2022-08-03 14:13 bruno-at-bareos Resolution open => no change required
2022-08-03 14:13 bruno-at-bareos Note Added: 0004709