1#!/bin/sh 2# 3# Run a simple backup using the Sparse option 4# then restore it. 5# 6TestName="sparse-compressed-test" 7JobName=Sparse-conpressed 8. scripts/functions 9 10scripts/cleanup 11scripts/copy-test-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 24 25 26start_test 27 28cat >${cwd}/tmp/bconcmds <<END_OF_DATA 29@$out /dev/null 30messages 31@$out ${cwd}/tmp/log1.out 32label storage=File volume=TestVolume001 33run job=SparseCompressedTest yes 34wait 35messages 36@# 37@# now do a restore 38@# 39@$out ${cwd}/tmp/log2.out 40restore where=${cwd}/tmp/bareos-restores select all storage=File done 41yes 42wait 43messages 44quit 45END_OF_DATA 46 47run_bareos 48check_for_zombie_jobs storage=File 49stop_bareos 50 51check_two_logs 52check_restore_diff 53end_test 54