]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/gigaslam-sparse-test
00223111a288f0edc2da196106602b0178364d3a
[bacula/bacula] / regress / tests / gigaslam-sparse-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory using the Sparse option
4 #   then restore it.
5 #
6 TestName="sparse-test"
7 JobName=SparseTest
8 . scripts/functions
9 set_debug 1
10
11 cwd=`pwd`
12 scripts/cleanup
13 scripts/copy-test-confs
14 echo "${cwd}/build" >/tmp/file-list
15 cd ${cwd}/build/src/tools
16 ./gigaslam
17 if [ $? != 0 ]; then
18    echo "Execute of ${cwd}/build/src/tools/gigaslam failed."
19    rm -f ${cwd}/build/src/tools/gigaslam.gif
20    exit 1
21 fi
22 cd ${cwd}
23
24 start_test
25
26 cat >tmp/bconcmds <<END_OF_DATA
27 @output /dev/null
28 messages
29 @$out tmp/log1.out
30 label storage=File volume=TestVolume001
31 run job=$JobName yes
32 wait
33 messages
34 list volumes
35 @# 
36 @# now do a restore
37 @#
38 @$out tmp/log2.out
39 restore where=${cwd}/tmp/bacula-restores select storage=File
40 unmark *
41 mark *
42 done
43 yes
44 wait
45 messages
46 @output
47 quit
48 END_OF_DATA
49
50 run_bacula
51 check_for_zombie_jobs storage=File 
52 ls -l ${cwd}/tmp
53 stop_bacula
54
55 check_two_logs
56 check_restore_diff
57 end_test
58 rm -f ${cwd}/build/src/tools/gigaslam.gif