]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/sparse-compressed-test
backport code from master
[bacula/bacula] / regress / tests / sparse-compressed-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-compressed-test"
7 JobName=Sparse-conpressed
8 . scripts/functions
9
10 cwd=`pwd`
11 scripts/cleanup
12 scripts/copy-test-confs
13 echo "${cwd}/build" >${cwd}/tmp/file-list
14
15 start_test
16
17 cat >${cwd}/tmp/bconcmds <<END_OF_DATA
18 @$out /dev/null
19 messages
20 @$out ${cwd}/tmp/log1.out
21 label storage=File volume=TestVolume001
22 run job=SparseCompressedTest yes
23 wait
24 messages
25 @# 
26 @# now do a restore
27 @#
28 @$out ${cwd}/tmp/log2.out   
29 restore where=${cwd}/tmp/bacula-restores select all storage=File done
30 yes
31 wait
32 messages
33 quit
34 END_OF_DATA
35
36 run_bacula
37 check_for_zombie_jobs storage=File 
38 stop_bacula
39
40 check_two_logs
41 check_restore_diff
42 end_test