3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Run a simple backup of the Bacula build directory using the compressed option
9 # then backup a second time and finally restore it
11 TestName="two-jobs-test"
17 scripts/copy-test-confs
18 echo "${cwd}/build" >${cwd}/tmp/file-list
20 #echo "${cwd}/build/src/Makefile" >${cwd}/tmp/file-list
21 #echo "${cwd}/build/src/Makefile.in" >>${cwd}/tmp/file-list
22 #echo "${cwd}/build/src/testprogs.tar.gz" >>${cwd}/tmp/file-list
23 #echo "${cwd}/build/src/dummy" >>${cwd}/tmp/file-list
24 #echo "${cwd}/build/src/stored" >>${cwd}/tmp/file-list
25 #echo "${cwd}/build/src/dird" >>${cwd}/tmp/file-list
26 #echo "${cwd}/build/src/filed" >>${cwd}/tmp/file-list
27 #echo "${cwd}/build/src/console" >>${cwd}/tmp/file-list
28 #echo "${cwd}/build/src/qt-console" >>${cwd}/tmp/file-list
29 #echo "${cwd}/build/src/cats" >>${cwd}/tmp/file-list
31 change_jobname CompressedTest $JobName
34 cat >tmp/bconcmds <<END_OF_DATA
35 setdebug level=4 storage=File
39 estimate job=$JobName listing
44 label storage=File volume=TestVolume001
52 check_for_zombie_jobs storage=File
55 #$bin/bls -d 4 -v -c $conf/bacula-sd.conf -V 'TestVolume001' FileStorage
56 touch ${cwd}/build/src/dird/dird_conf.c
60 cat >tmp/bconcmds <<END_OF_DATA
64 setdebug level=4 storage=File
65 run level=Full job=$JobName
70 @# now do several restores to ensure we cleanup between jobs
73 restore where=${cwd}/tmp/bacula-restores select all storage=File done
76 setdebug level=4 storage=File
77 restore where=${cwd}/tmp/bacula-restores select all storage=File done
81 setdebug level=4 storage=File
82 restore where=${cwd}/tmp/bacula-restores select storage=File
91 $bin/bls -d 4 -v -c $conf/bacula-sd.conf -V 'TestVolume001' FileStorage
95 check_for_zombie_jobs storage=File
100 #cd ${cwd}/tmp/bacula-restores/${cwd}/build
101 #for i in src/*; do \
102 # diff -ur $i ${cwd}/build/$i
103 # if test $? -ne 0; then