3 # Run a simple backup of the Bacula build directory using the compressed option
4 # then backup four times, each with incremental then
5 # do a bscan and restore.
6 # It should require at least 4 different bsrs.
15 echo "${cwd}/build" >/tmp/file-list
17 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
18 sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
20 change_jobname NightlySave $JobName
23 cat <<END_OF_DATA >tmp/bconcmds
25 estimate job=$JobName listing
26 estimate job=$JobName listing
27 estimate job=$JobName listing
30 setdebug level=2 storage=DDS-4
31 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
34 run job=$JobName level=Full yes
36 run job=$JobName level=Full yes
43 check_for_zombie_jobs storage=DDS-4
46 # make some files for the incremental to pick up
47 touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
48 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
53 cat <<END_OF_DATA >tmp/bconcmds
57 run job=$JobName level=Incremental yes
64 scripts/check_for_zombie_jobs storage=DDS-4
67 touch ${cwd}/build/src/dird/*.c
68 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
72 cat <<END_OF_DATA >tmp/bconcmds
76 run job=$JobName level=Incremental yes
83 scripts/check_for_zombie_jobs storage=DDS-4
86 # make some files for the incremental to pick up
87 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
88 #echo "abc" > ${cwd}/build/src/lib/dummy
92 cat <<END_OF_DATA >tmp/bconcmds
96 run job=$JobName level=Incremental yes
104 scripts/check_for_zombie_jobs storage=DDS-4
109 # now drop and recreate the database
112 ./drop_bacula_tables >/dev/null 2>&1
113 ./make_bacula_tables >/dev/null 2>&1
114 ./grant_bacula_privileges 2>&1 >/dev/null
117 echo "volume=TestVolume001" >tmp/bscan.bsr
118 bin/bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 2>&1 >/dev/null
120 cat <<END_OF_DATA >tmp/bconcmds
127 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
136 check_for_zombie_jobs storage=DDS-4
138 rm -f ${cwd}/build/src/lib/dummy