]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/bextract-test
904a39223ba36de0770a96a27c51d00ee58f57c0
[bacula/bacula] / regress / tests / bextract-test
1 #!/bin/sh
2 #
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.
6 #
7 TestName="bextract-test"
8 JobName="bextract"
9 . scripts/functions
10 set_debug 0
11
12 scripts/cleanup
13 scripts/copy-test-confs
14 echo "${cwd}/build" >/tmp/file-list
15
16 change_jobname NightlySave $JobName 
17 start_test
18
19 cat <<END_OF_DATA >tmp/bconcmds
20 @output /dev/null
21 messages
22 @$out tmp/log1.out
23 label storage=File1 volume=TestVolume001
24 label storage=File1 volume=TestVolume002
25 update Volume=TestVolume001 MaxVolBytes=3000000
26 @#setdebug level=400 dir
27 @#setdebug level=400 storage=File1
28 run job=$JobName storage=File1 yes
29 wait
30 messages
31 @# 
32 @# now build the bsr file
33 @#
34 @$out tmp/log2.out
35 restore bootstrap=${cwd}/working/restore.bsr where=${cwd}/tmp/bacula-restores select all storage=File1 done
36 no
37 wait
38 messages
39 @$out
40 quit
41 END_OF_DATA
42
43 run_bacula
44 check_for_zombie_jobs storage=File1
45 stop_bacula
46
47 mkdir -p ${cwd}/tmp/bacula-restores
48 bin/bextract -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores 2>&1 >/dev/null
49 rstat=$?
50 grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
51 bstat=$?
52 check_restore_diff
53 end_test