3 # Run a simple backup of the Bacula build directory but
4 # split the archive into two volumes, then build a BSR with
5 # the restore command and use bextract to restore the files.
8 scripts/copy-test-confs
10 echo "${cwd}/build" >/tmp/file-list
11 bin/bacula stop 2>&1 >/dev/null
13 ./drop_bacula_tables >/dev/null 2>&1
14 ./make_bacula_tables >/dev/null 2>&1
15 ./grant_bacula_privileges 2>&1 >/dev/null
20 echo " === Starting bextract-test ==="
21 echo " === Starting bextract-test ===" >working/log
24 bin/bacula start 2>&1 >/dev/null
25 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
29 label storage=File1 volume=TestVolume001
30 label storage=File1 volume=TestVolume002
31 update Volume=TestVolume001 MaxVolBytes=3000000
32 run job=NightlySave storage=File1 yes
36 @# now build the bsr file
39 restore where=${cwd}/tmp/bacula-restores select all storage=File1 done
46 scripts/check_for_zombie_jobs storage=File1
47 bin/bacula stop 2>&1 >/dev/null
48 mkdir -p ${cwd}/tmp/bacula-restores
49 bin/bextract -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores 2>&1 >/dev/null
50 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
52 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
53 if [ $? != 0 -o $bstat != 0 ] ; then
56 echo " !!!!! bextract-test Bacula source failed!!! !!!!! "
57 echo " !!!!! bextract-test failed!!! !!!!! " >>test.out
60 echo " ===== bextract-test Bacula source OK ===== "
61 echo " ===== bextract-test OK ===== " >>test.out