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