]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/data-encrypt-test
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / tests / data-encrypt-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 with encryption and no other options 
9 #    (i.e. no compression and no sparse handling) of the 
10 #    Bacula build directory.
11 #
12 TestName="data-encrypt-test"
13 JobName=Crypto
14 . scripts/functions
15
16 scripts/cleanup
17 scripts/copy-crypto-confs
18 echo "${cwd}/build" >${cwd}/tmp/file-list
19
20 change_jobname NightlySave $JobName
21 start_test
22
23 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
24 @output /dev/null
25 messages
26 @$out ${cwd}/tmp/log1.out
27 label storage=File volume=TestVolume001
28 @#setdebug level=10 fd
29 run job=$JobName yes
30 wait
31 messages
32 @# 
33 @# now do a restore
34 @#
35 @$out ${cwd}/tmp/log2.out
36 @#setdebug level=10 fd
37 restore where=${cwd}/tmp/bacula-restores storage=File
38 5
39 mark *
40 done
41 yes
42 wait
43 messages
44 quit
45 END_OF_DATA
46
47 run_bacula
48 sleep 2
49 check_for_zombie_jobs storage=File 
50 stop_bacula
51
52 du -s build >${cwd}/tmp/log2.out
53 du -s ${cwd}/tmp/bacula-restores/ >${cwd}/tmp/log2.out
54
55 check_two_logs
56 check_restore_diff
57 end_test