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.
7 TestName="bextract-test"
12 scripts/copy-test-confs
13 echo "${cwd}/build" >${cwd}/tmp/file-list
15 change_jobname NightlySave $JobName
18 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
21 @$out ${cwd}/tmp/log1.out
22 label storage=File1 volume=TestVolume001
23 label storage=File1 volume=TestVolume002
24 update Volume=TestVolume001 MaxVolBytes=3000000
25 @#setdebug level=400 dir
26 setdebug level=400 storage=File1
27 run job=$JobName storage=File1 yes
31 @# now build the bsr file but do not restore
33 @$out ${cwd}/tmp/log2.out
34 restore bootstrap=${cwd}/working/restore.bsr where=${cwd}/tmp/bacula-restores select all storage=File1 done
43 check_for_zombie_jobs storage=File1
46 mkdir -p ${cwd}/tmp/bacula-restores
47 if test "$debug" -eq 1 ; then
48 $bin/bextract -v -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores
50 $bin/bextract -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores 2>&1 >/dev/null
53 grep "^ Termination: *Backup OK" ${cwd}/tmp/log1.out 2>&1 >/dev/null