1#!/bin/sh 2# 3# Run a simple backup 4# to a tape where the maximum tape file size is set to 1M 5# 6TestName="small-file-size-tape" 7JobName=smallfilesize 8. scripts/functions 9 10require_tape_drive 11 12scripts/cleanup-tape 13scripts/copy-tape-confs 14 15cp ${cwd}/bin/bareos-sd.conf ${cwd}/tmp/1 16sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bareos-sd.conf 17 18change_jobname NightlySave $JobName 19 20# Directory to backup. 21# This directory will be created by setup_data(). 22BackupDirectory="${tmp}/data" 23 24# Use a tgz to setup data to be backuped. 25# Data will be placed at "${tmp}/data/". 26setup_data data/small.tgz 27 28# the default fileset FS_TESTJOB backups all file and directories defined in "${tmp}/file-list". 29echo "${BackupDirectory}" >${tmp}/file-list 30 31 32start_test 33 34cat <<END_OF_DATA >${cwd}/tmp/bconcmds 35@$out /dev/null 36messages 37@$out ${cwd}/tmp/log1.out 38label storage=tape volume=TestVolume001 slot=0 pool=Default 39setdebug level=2 storage=tape 40run job=$JobName yes 41wait 42messages 43@# 44@# now do a restore 45@# 46@$out ${cwd}/tmp/log2.out 47restore where=${cwd}/tmp/bareos-restores select storage=tape 48unmark * 49mark * 50done 51yes 52wait 53messages 54quit 55END_OF_DATA 56 57run_bareos 58check_for_zombie_jobs storage=tape 59stop_bareos 60 61check_two_logs 62check_restore_diff 63end_test 64