]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/bextract-test
Update disk tests
[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/copy-test-confs
13 scripts/cleanup
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 run job=$JobName storage=File1 yes
27 wait
28 messages
29 @# 
30 @# now build the bsr file
31 @#
32 @$out tmp/log2.out
33 restore bootstrap=${cwd}/working/restore.bsr where=${cwd}/tmp/bacula-restores select all storage=File1 done
34 no
35 wait
36 messages
37 @$out
38 quit
39 END_OF_DATA
40
41 run_bacula
42 check_for_zombie_jobs storage=File1
43 stop_bacula
44
45 mkdir -p ${cwd}/tmp/bacula-restores
46 bin/bextract -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores 2>&1 >/dev/null
47 rstat=$?
48 grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
49 bstat=$?
50 check_restore_diff
51 end_test