3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
6 # Test if Bacula can automatically create a Volume label.
9 TestName="auto-label-test"
15 echo "${cwd}/build" >${cwd}/tmp/file-list
17 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
18 sed "s%# Label Format% Label Format%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
20 change_jobname CompressedTest $JobName
23 cat <<END_OF_SCRIPT >${cwd}/tmp/bconcmds
26 @$out ${cwd}/tmp/log1.out
31 @#setdebug level=110 storage=File
32 run job=$JobName storage=File yes
37 SELECT StartTime, JobFiles, JobId, Level, count(*) AS nb_jobmedia
38 FROM JobMedia join Job using (JobId) join Client using (ClientId)
39 where Client.Name = 'localhost-fd' group by JobId, Level, StartTime,
40 JobFiles order by JobId desc ;
46 @$out ${cwd}/tmp/log2.out
47 @#setdebug level=400 storage=File
48 restore where=${cwd}/tmp/bacula-restores select storage=File
68 check_for_zombie_jobs storage=File