1#!/bin/sh
2#
3# Run a simple backup with encryption and compression
4#   then verify the signatures.
5#
6TestName="compressed-encrypt-test"
7JobName=CompressedTest
8. scripts/functions
9
10scripts/cleanup
11scripts/copy-crypto-confs
12
13# Directory to backup.
14# This directory will be created by setup_data().
15BackupDirectory="${tmp}/data"
16
17# Use a tgz to setup data to be backuped.
18# Data will be placed at "${tmp}/data/".
19setup_data data/small.tgz
20
21# the default fileset FS_TESTJOB backups all file and directories defined in "${tmp}/file-list".
22echo "${BackupDirectory}" >${tmp}/file-list
23
24start_test
25
26cat <<END_OF_DATA >${cwd}/tmp/bconcmds
27@$out /dev/null
28messages
29@$out ${cwd}/tmp/log1.out
30label storage=File volume=TestVolume001
31setdebug level=10 fd
32run job=$JobName yes
33wait
34messages
35list volumes
36@#
37@# now do a restore
38@#
39@$out ${cwd}/tmp/log2.out
40@# setdebug level=0 fd
41restore where=${cwd}/tmp/bareos-restores storage=File
425
43mark *
44done
45yes
46wait
47messages
48quit
49END_OF_DATA
50
51run_bareos
52sleep 2
53check_for_zombie_jobs storage=File
54stop_bareos
55
56check_two_logs
57check_restore_diff
58end_test
59