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
12 bin/drop_sqlite_tables
13 bin/make_sqlite_tables
17 echo " === Starting bextract-test ==="
18 echo " === Starting bextract-test ===" >working/log
21 bin/bacula start 2>&1 >/dev/null
22 bin/console -c bin/console.conf <<END_OF_DATA
30 update Volume=TestVolume001
34 run job=NightlySave storage=File1
39 @# now build the bsr file
42 restore where=${cwd}/tmp/bacula-restores current all
49 bin/bacula stop 2>&1 >/dev/null
50 mkdir -p ${cwd}/tmp/bacula-restores
51 bin/bextract -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores 2>&1 >/dev/null
52 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
54 diff -r build tmp/bacula-restores${cwd}/build
55 if [ $? != 0 -o $bstat != 0 ] ; then
58 echo " !!!!! bextract-test Bacula source failed!!! !!!!! "
59 echo " !!!!! bextract-test failed!!! !!!!! " >>test.out
62 echo " ===== bextract-test Bacula source OK ===== "
63 echo " ===== bextract-test OK ===== " >>test.out