1#!/bin/sh 2# 3# Run a simple backup but 4# split the archive into four volumes, two of which are 5# totally full. I.e. make sure that bsr selects all tapes 6# including those fully spanned. 7# 8TestName="span-vol-test" 9JobName=SpanVol 10. scripts/functions 11 12scripts/cleanup 13scripts/copy-test-confs 14 15# Directory to backup. 16# This directory will be created by setup_data(). 17BackupDirectory="${tmp}/data" 18 19# Use a tgz to setup data to be backuped. 20# Data will be placed at "${tmp}/data/". 21setup_data data/small.tgz 22 23# the default fileset FS_TESTJOB backups all file and directories defined in "${tmp}/file-list". 24echo "${BackupDirectory}" >${tmp}/file-list 25 26 27 28change_jobname NightlySave $JobName 29start_test 30 31cat <<END_OF_DATA >${cwd}/tmp/bconcmds 32@$out /dev/null 33messages 34@$out ${cwd}/tmp/log1.out 35label storage=File1 volume=TestVolume004 36label storage=File1 volume=TestVolume003 37label storage=File1 volume=TestVolume002 38label storage=File1 volume=TestVolume001 39update Volume=TestVolume004 MaxVolBytes=3000000 40update Volume=TestVolume003 MaxVolBytes=3000000 41update Volume=TestVolume002 MaxVolBytes=3000000 42run job=$JobName storage=File1 yes 43wait 44list volumes 45messages 46@# 47@# now do a restore 48@# 49@$out ${cwd}/tmp/log2.out 50restore where=${cwd}/tmp/bareos-restores select storage=File1 51unmark * 52mark * 53done 54yes 55wait 56messages 57quit 58END_OF_DATA 59 60run_bareos 61check_for_zombie_jobs storage=File1 62stop_bareos 63 64check_two_logs 65check_restore_diff 66end_test 67