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