Bareos Bug Tracker
Bareos Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001030bareos-core[All Projects] storage daemonpublic2018-12-06 16:552018-12-06 17:01
Reporterstephand 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version17.2.7 
Target VersionFixed in Version 
Summary0001030: bscan does not work for migration and copy jobs
DescriptionWhen trying to bscan volumes containing copy or migration jobs, bscan does not find job, file and restoreobject data for all but the very first copy or migration job.
Steps To Reproduce1. Add an additional storage device by adding the config file /etc/bareos/bareos-sd.d/device/FileStorage2.conf with the following content:

Device {
  Name = FileStorage2
  Media Type = File2
  Archive Device = /data/bareos/storage
  LabelMedia = yes; # lets Bareos label unlabeled media
  Random Access = yes;
  AutomaticMount = yes; # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
  Description = "File device. A connecting Director must have the same Name and MediaType."
}

2. Add the additional storage to the director by adding the config file /etc/bareos/bareos-dir.d/storage/File2.conf with the following content:

Storage {
  Name = File2
  Address = vgr-c7bpdevsrv # N.B. Use a fully qualified name here (do not use "localhost" here).
  Password = "AsdfkjsaidjfnwqIsansdaiasIJNasdifjasdfIUasdf" # replace by your bareos-sd password
  Device = FileStorage2
  Media Type = File2
}

3. Set up a copy job by adding the config file /etc/bareos/bareos-dir.d/job/copyjob.conf with the following content:

Job {
  Name = "copytest1"
  Type = Copy
  Messages = Standard
  Pool = Full
  Selection Type = PoolUncopiedJobs
}

4. Set up a normal backup job for testing by adding the config file # cat /etc/bareos/bareos-dir.d/job/testjob.conf with the following content:

Job {
  Name = "Data1"
  JobDefs = "DefaultJob"
  FileSet = "Data1Set"
  Spool Attributes = yes
}

FileSet {
  Name = "Data1Set"
  Include {
    Options {
      signature = SHA1
    }
    File = /data/1
  }
}

5. Create a target pool for the copy jobs by adding the config file /etc/bareos/bareos-dir.d/pool/File2Pool.conf with the following content:

Pool {
  Name = File2Pool
  Pool Type = Backup
  Recycle = yes # Bareos can automatically recycle Volumes
  AutoPrune = yes # Prune expired volumes
  Maximum Volume Bytes = 20M # Limit Volume size to something reasonable
  Maximum Volumes = 100 # Limit number of Volumes in Pool
  Label Format = "File2-" # Volumes will be labeled "Full-<volume-id>"
  Storage = File2
}

6. Add the "Next Pool" definition to the pool config file /etc/bareos/bareos-dir.d/pool/Full.conf by inserting the line
  Next Pool = File2Pool
so that the file looks like this:

Pool {
  Name = Full
  Pool Type = Backup
  Recycle = yes # Bareos can automatically recycle Volumes
  AutoPrune = yes # Prune expired volumes
  Volume Retention = 365 days # How long should the Full Backups be kept? (0000006)
  Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
  Maximum Volumes = 100 # Limit number of Volumes in Pool
  Label Format = "Full-" # Volumes will be labeled "Full-<volume-id>"
  Next Pool = File2Pool
}

7. Run a normal full backup job by executing

mkdir -p /data/1; rm -rf /data/1/*; dd if=/dev/zero of=/data/1/test1M.bin bs=1M count=1
echo "run job=Data1 Level=Full yes" | bconsole

8. Run the copy joby by executing

echo "run job=copytest1 yes" | bconsole

9. Run the following commands:
su -s /bin/bash - bareos
bscan -vv -r -B postgresql -V File2-0002 /data/bareos/storage

10. Repeat steps 7. - 9.
Additional InformationNormally for each JobId, a pair of Begin Job Session Record" and "End Job Session Record" shoulb be written to the volume. Note that the job session records are only written to volume for use with bscan, neither normal restore nor bextract requires them.

The problem here is that only the very first copy or migration jobs writes two "Begin Job Session Record" to volume, the output of step 8 looks like this:

-bash-4.2$ bscan -vv -r -B postgresql -V File2-0002 /data/bareos/storage
bscan: butil.c:273-0 Using device: "/data/bareos/storage" for reading.
06-Dec 16:18 bscan JobId 0: Ready to read from volume "File2-0002" on device "FileStorage2" (/data/bareos/storage).
bscan: bscan.c:345-0 Using Database: bareos, User: bareos
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=-2 Stream=0 len=181

Volume Label:
Id : Bareos 2.0 immortal
VerNo : 20
VolName : File2-0002
PrevVolName :
VolFile : 0
LabelType : VOL_LABEL
LabelSize : 181
PoolName : File2Pool
MediaType : File2
PoolType : Backup
HostName : vgr-c7bpdevsrv.stephand.kvm
Date label written: 06-Dec-2018 15:58
bscan: bscan.c:537-0 Pool record for File2Pool found in DB.
bscan: bscan.c:551-0 Pool type "Backup" is OK.
bscan: bscan.c:563-0 Media record for File2-0002 found in DB.
bscan: bscan.c:582-0 Media type "File2" is OK.
bscan: bscan.c:595-0 VOL_LABEL: OK for Volume: File2-0002
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=-4 Stream=3 len=151

Begin Job Session Record:
JobId : 3
VerNum : 20
PoolName : File2Pool
PoolType : Backup
JobName : copytest1
ClientName : bareos-fd
Job (unique name) : Data1.2018-12-06_15.56.52_04
FileSet : Data1Set
JobType : B
JobLevel : F
Date written : 06-Dec-2018 15:58
bscan: bscan.c:620-0 SOS_LABEL: Found Job record for JobId: 1
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=-4 Stream=1 len=142

Begin Job Session Record:
JobId : 1
VerNum : 20
PoolName : Full
PoolType : Backup
JobName : Data1
ClientName : bareos-fd
Job (unique name) : Data1.2018-12-06_15.56.52_04
FileSet : Data1Set
JobType : B
JobLevel : F
Date written : 06-Dec-2018 15:56
bscan: bscan.c:620-0 SOS_LABEL: Found Job record for JobId: 1
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=1 len=85
bscan JobId 0: -rw-r--r-- 1 root root 1048576 2018-12-06 15:56:50 /data/1/test1M.bin
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=10 len=20
bscan: bscan.c:898-0 Got SHA1 record: O3H0P/MPSxW1zYXdnpXrx+hOtaM
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=2 Stream=1 len=71
bscan JobId 0: drwxr-xr-x 2 root root 24 2018-12-06 15:56:50 /data/1/
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=-5 Stream=3 len=187

End Job Session Record:
JobId : 3
VerNum : 20
PoolName : File2Pool
PoolType : Backup
JobName : copytest1
ClientName : bareos-fd
Job (unique name) : Data1.2018-12-06_15.56.52_04
FileSet : Data1Set
JobType : B
JobLevel : F
JobFiles : 2
JobBytes : 1,048,752
StartBlock : 217
EndBlock : 1,032,409
StartFile : 0
EndFile : 0
JobErrors : 0
JobStatus : T
Date written : 06-Dec-2018 15:58
06-Dec 16:18 bscan JobId 0: End of Volume at file 0 on device "FileStorage2" (/data/bareos/storage), Volume "File2-0002"
bscan (0): bscan.c:382-0 ========== JobId=0 ========
bscan (0): bscan.c:382-0 ========== JobId=1 ========
bscan: bscan.c:387-0 Create JobMedia for Job Data1.2018-12-06_15.56.52_04
06-Dec 16:18 bscan JobId 0: End of all volumes.
bscan: bscan.c:509-0 Record: SessId=0 SessTim=0 FileIndex=-6 Stream=0 len=0
End of physical tape.
bscan: bscan.c:767-0 End of all Volumes. VolFiles=0 VolBlocks=0 VolBytes=1,049,697
Records would have been added or updated in the catalog:
      1 Media
      1 Pool
      2 Job
      2 File
      0 RestoreObject
06-Dec 16:18 bscan JobId 0: Releasing device "FileStorage2" (/data/bareos/storage).

There should be only one "Begin Job Session Record" and it should have the JobId 4, because that is the resulting JobId:

*list jobs
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
+-------+-----------+-----------+---------------------+------+-------+----------+-----------+-----------+
| jobid | name | client | starttime | type | level | jobfiles | jobbytes | jobstatus |
+-------+-----------+-----------+---------------------+------+-------+----------+-----------+-----------+
| 1 | Data1 | bareos-fd | 2018-12-06 15:56:54 | B | F | 2 | 1,048,576 | T |
| 4 | Data1 | bareos-fd | 2018-12-06 15:56:54 | C | F | 2 | 1,048,752 | T |
| 2 | copytest1 | | 2018-12-06 15:58:22 | c | F | 0 | 0 | T |
| 3 | copytest1 | | 2018-12-06 15:58:24 | c | F | 0 | 0 | T |
+-------+-----------+-----------+---------------------+------+-------+----------+-----------+-----------+

06-Dec 15:58 bareos-dir JobId 2: The following 1 JobId was chosen to be copied: 1
06-Dec 15:58 bareos-dir JobId 2: Automatically selected Catalog: MyCatalog
06-Dec 15:58 bareos-dir JobId 2: Using Catalog "MyCatalog"
06-Dec 15:58 bareos-dir JobId 3: Copying using JobId=1 Job=Data1.2018-12-06_15.56.52_04
06-Dec 15:58 bareos-dir JobId 3: Bootstrap records written to /var/lib/bareos/bareos-dir.restore.1.bsr
06-Dec 15:58 bareos-dir JobId 2: Job queued. JobId=3
06-Dec 15:58 bareos-dir JobId 2: Copying JobId 3 started.
06-Dec 15:58 bareos-dir JobId 2: Bareos bareos-dir 17.2.7 (16Jul18):
  Build OS: x86_64-redhat-linux-gnu redhat Red Hat Enterprise Linux Server release 7.0 (Maipo)
  Current JobId: 2
  Current Job: copytest1.2018-12-06_15.58.20_06
  Catalog: "MyCatalog" (From Default catalog)
  Start time: 06-Dec-2018 15:58:22
  End time: 06-Dec-2018 15:58:22
  Elapsed time: 0 secs
  Priority: 10
  Termination: Copying OK

06-Dec 15:58 bareos-dir JobId 3: Start Copying JobId 3, Job=copytest1.2018-12-06_15.58.22_07
06-Dec 15:58 bareos-dir JobId 3: Using Device "FileStorage" to read.
06-Dec 15:58 bareos-dir JobId 3: Created new Volume "File2-0002" in catalog.
06-Dec 15:58 bareos-dir JobId 3: Using Device "FileStorage2" to write.
06-Dec 15:58 bareos-sd JobId 3: Ready to read from volume "Full-0001" on device "FileStorage" (/var/lib/bareos/storage).
06-Dec 15:58 bareos-sd JobId 3: Labeled new Volume "File2-0002" on device "FileStorage2" (/data/bareos/storage).
06-Dec 15:58 bareos-sd JobId 3: Wrote label to prelabeled Volume "File2-0002" on device "FileStorage2" (/data/bareos/storage)
06-Dec 15:58 bareos-sd JobId 3: Forward spacing Volume "Full-0001" to file:block 0:210.
06-Dec 15:58 bareos-sd JobId 3: End of Volume at file 0 on device "FileStorage" (/var/lib/bareos/storage), Volume "Full-0001"
06-Dec 15:58 bareos-sd JobId 3: End of all volumes.
06-Dec 15:58 bareos-sd JobId 3: Elapsed time=00:00:01, Transfer rate=1.048 M Bytes/second
06-Dec 15:58 bareos-sd JobId 3: Releasing device "FileStorage2" (/data/bareos/storage).
06-Dec 15:58 bareos-sd JobId 3: Releasing device "FileStorage" (/var/lib/bareos/storage).
06-Dec 15:58 bareos-dir JobId 3: Insert of attributes batch table with 2 entries start
06-Dec 15:58 bareos-dir JobId 3: Insert of attributes batch table done
06-Dec 15:58 bareos-dir JobId 3: Bareos bareos-dir 17.2.7 (16Jul18):
  Build OS: x86_64-redhat-linux-gnu redhat Red Hat Enterprise Linux Server release 7.0 (Maipo)
  Prev Backup JobId: 1
  Prev Backup Job: Data1.2018-12-06_15.56.52_04
  New Backup JobId: 4
  Current JobId: 3
  Current Job: copytest1.2018-12-06_15.58.22_07
  Backup Level: Incremental
  Client: bareos-fd
  FileSet: "Data1Set"
  Read Pool: "Full" (From Job resource)
  Read Storage: "File" (From previous Job)
  Write Pool: "File2Pool" (From Job Pool's NextPool resource)
  Write Storage: "File2" (From Storage from Pool's NextPool resource)
  Next Pool: "File2Pool" (From Job Pool's NextPool resource)
  Catalog: "MyCatalog" (From Default catalog)
  Start time: 06-Dec-2018 15:58:24
  End time: 06-Dec-2018 15:58:24
  Elapsed time: 0 secs
  Priority: 10
  SD Files Written: 2
  SD Bytes Written: 1,048,752 (1.048 MB)
  Rate: 0.0 KB/s
  Volume name(s): File2-0002
  Volume Session Id: 2
  Volume Session Time: 1544108174
  Last Volume Bytes: 1,050,313 (1.050 MB)
  SD Errors: 0
  SD termination status: OK
  Termination: Copying OK



After running another copy job (step 10), only an "End Job Session Record" was added to the volume, and bscan does not find the job that was recently added to the volume:

-bash-4.2$ bscan -vv -r -B postgresql -V File2-0002 /data/bareos/storage
bscan: butil.c:273-0 Using device: "/data/bareos/storage" for reading.
06-Dec 16:32 bscan JobId 0: Ready to read from volume "File2-0002" on device "FileStorage2" (/data/bareos/storage).
bscan: bscan.c:345-0 Using Database: bareos, User: bareos
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=-2 Stream=0 len=181

Volume Label:
Id : Bareos 2.0 immortal
VerNo : 20
VolName : File2-0002
PrevVolName :
VolFile : 0
LabelType : VOL_LABEL
LabelSize : 181
PoolName : File2Pool
MediaType : File2
PoolType : Backup
HostName : vgr-c7bpdevsrv.stephand.kvm
Date label written: 06-Dec-2018 15:58
bscan: bscan.c:537-0 Pool record for File2Pool found in DB.
bscan: bscan.c:551-0 Pool type "Backup" is OK.
bscan: bscan.c:563-0 Media record for File2-0002 found in DB.
bscan: bscan.c:582-0 Media type "File2" is OK.
bscan: bscan.c:595-0 VOL_LABEL: OK for Volume: File2-0002
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=-4 Stream=3 len=151

Begin Job Session Record:
JobId : 3
VerNum : 20
PoolName : File2Pool
PoolType : Backup
JobName : copytest1
ClientName : bareos-fd
Job (unique name) : Data1.2018-12-06_15.56.52_04
FileSet : Data1Set
JobType : B
JobLevel : F
Date written : 06-Dec-2018 15:58
bscan: bscan.c:620-0 SOS_LABEL: Found Job record for JobId: 1
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=-4 Stream=1 len=142

Begin Job Session Record:
JobId : 1
VerNum : 20
PoolName : Full
PoolType : Backup
JobName : Data1
ClientName : bareos-fd
Job (unique name) : Data1.2018-12-06_15.56.52_04
FileSet : Data1Set
JobType : B
JobLevel : F
Date written : 06-Dec-2018 15:56
bscan: bscan.c:620-0 SOS_LABEL: Found Job record for JobId: 1
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=1 len=85
bscan JobId 0: -rw-r--r-- 1 root root 1048576 2018-12-06 15:56:50 /data/1/test1M.bin
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=1 Stream=10 len=20
bscan: bscan.c:898-0 Got SHA1 record: O3H0P/MPSxW1zYXdnpXrx+hOtaM
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=2 Stream=1 len=71
bscan JobId 0: drwxr-xr-x 2 root root 24 2018-12-06 15:56:50 /data/1/
bscan: bscan.c:509-0 Record: SessId=2 SessTim=1544108174 FileIndex=-5 Stream=3 len=187

End Job Session Record:
JobId : 3
VerNum : 20
PoolName : File2Pool
PoolType : Backup
JobName : copytest1
ClientName : bareos-fd
Job (unique name) : Data1.2018-12-06_15.56.52_04
FileSet : Data1Set
JobType : B
JobLevel : F
JobFiles : 2
JobBytes : 1,048,752
StartBlock : 217
EndBlock : 1,032,409
StartFile : 0
EndFile : 0
JobErrors : 0
JobStatus : T
Date written : 06-Dec-2018 15:58
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=1 len=85
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=2 len=65536
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=1 Stream=10 len=20
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=2 Stream=1 len=71
bscan: bscan.c:779-0 Could not find Job for SessId=4 SessTime=1544108174 record.
bscan: bscan.c:509-0 Record: SessId=4 SessTim=1544108174 FileIndex=-5 Stream=7 len=191

End Job Session Record:
JobId : 7
VerNum : 20
PoolName : File2Pool
PoolType : Backup
JobName : copytest1
ClientName : bareos-fd
Job (unique name) : copytest1.2018-12-06_16.32.16_14
FileSet : Data1Set
JobType : c
JobLevel : I
JobFiles : 2
JobBytes : 1,048,752
StartBlock : 1,050,313
EndBlock : 2,082,505
StartFile : 0
EndFile : 0
JobErrors : 0
JobStatus : T
Date written : 06-Dec-2018 16:32
bscan: bscan.c:708-0 Could not find SessId=4 SessTime=1544108174 for EOS record.
06-Dec 16:32 bscan JobId 0: End of Volume at file 0 on device "FileStorage2" (/data/bareos/storage), Volume "File2-0002"
bscan (0): bscan.c:382-0 ========== JobId=0 ========
bscan (0): bscan.c:382-0 ========== JobId=1 ========
bscan: bscan.c:387-0 Create JobMedia for Job Data1.2018-12-06_15.56.52_04
06-Dec 16:32 bscan JobId 0: End of all volumes.
bscan: bscan.c:509-0 Record: SessId=0 SessTim=0 FileIndex=-6 Stream=0 len=0
End of physical tape.
bscan: bscan.c:767-0 End of all Volumes. VolFiles=0 VolBlocks=0 VolBytes=2,098,880
Records would have been added or updated in the catalog:
      1 Media
      1 Pool
      2 Job
      2 File
      0 RestoreObject
06-Dec 16:32 bscan JobId 0: Releasing device "FileStorage2" (/data/bareos/storage).


When the first volume is full, any additional volumes will end up without any "Begin Job Session Record" at all.
TagsNo tags attached.
bareos-master: impact
bareos-master: 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
Attached Files

- Relationships

-  Notes
(0003156)
stephand (developer)
2018-12-06 17:01

Verified that in Bareos 16.2 pairs of Begin/End Job Session Records are written for copy or migration jobs, however with JobIds of original backup job.

- Issue History
Date Modified Username Field Change
2018-12-06 16:55 stephand New Issue
2018-12-06 17:01 stephand Note Added: 0003156


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker