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.
14 echo "${cwd}/build" >tmp/file-list
16 cp ${cwd}/bin/bacula-sd.conf tmp/1
17 sed "s%# Maximum File Size% Maximum File Size%" tmp/1 >${cwd}/bin/bacula-sd.conf
19 change_jobname NightlySave $JobName
22 cat <<END_OF_DATA >tmp/bconcmds
24 estimate job=$JobName listing
25 estimate job=$JobName listing
26 estimate job=$JobName listing
29 setdebug level=2 storage=DDS-4
30 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
33 run job=$JobName level=Full yes
35 run job=$JobName level=Full yes
42 check_for_zombie_jobs storage=DDS-4
45 # make some files for the incremental to pick up
46 touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
47 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
52 cat <<END_OF_DATA >tmp/bconcmds
56 run job=$JobName level=Incremental yes
63 scripts/check_for_zombie_jobs storage=DDS-4
66 touch ${cwd}/build/src/dird/*.c
67 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
71 cat <<END_OF_DATA >tmp/bconcmds
75 run job=$JobName level=Incremental yes
82 scripts/check_for_zombie_jobs storage=DDS-4
85 # make some files for the incremental to pick up
86 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
87 #echo "abc" > ${cwd}/build/src/lib/dummy
91 cat <<END_OF_DATA >tmp/bconcmds
95 run job=$JobName level=Incremental yes
103 scripts/check_for_zombie_jobs storage=DDS-4
108 # now drop and recreate the database
111 ./drop_bacula_tables >/dev/null 2>&1
112 ./make_bacula_tables >/dev/null 2>&1
113 ./grant_bacula_privileges 2>&1 >/dev/null
116 echo "volume=TestVolume001" >tmp/bscan.bsr
117 if test "$debug" -eq 1 ; then
118 bin/bscan -w working -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4
120 bin/bscan -w working -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 2>&1 >/dev/null
123 cat <<END_OF_DATA >tmp/bconcmds
130 restore where=tmp/bacula-restores select all storage=DDS-4 done
139 check_for_zombie_jobs storage=DDS-4
141 rm -f ${cwd}/build/src/lib/dummy