]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/compressed-test
regress: tweak prune-migration-test
[bacula/bacula] / regress / tests / compressed-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory using the compressed option
4 #   then restore it.
5 #
6 TestName="compressed-test"
7 JobName=compressed
8 . scripts/functions
9
10 scripts/cleanup
11 scripts/copy-test-confs
12 echo "${cwd}/build" >${cwd}/tmp/file-list
13
14 change_jobname CompressedTest $JobName
15 start_test
16       
17 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
18 @$out /dev/null
19 messages
20 @$out ${cwd}/tmp/log1.out
21 status all
22 status all
23 messages
24 label storage=File volume=TestVolume001
25 run job=$JobName storage=File yes
26 wait
27 messages
28 @# 
29 @# now do a restore
30 @#
31 @$out ${cwd}/tmp/log2.out
32 restore where=${cwd}/tmp/bacula-restores select storage=File
33 unmark *
34 mark *
35 done
36 yes
37 wait
38 messages
39 quit
40 END_OF_DATA
41
42 run_bacula
43 check_for_zombie_jobs storage=File
44 stop_bacula
45
46 check_two_logs
47 check_restore_diff
48 grep " Software Compression" ${cwd}/tmp/log1.out | grep "%" 2>&1 1>/dev/null
49 if [ $? != 0 ] ; then
50    echo "  !!!!! No compression !!!!!"
51    bstat=1
52 fi
53 end_test