1#!/bin/sh 2# 3# Run a job with small Maximum Volume Bytes. It should 4# create a lot of volumes. The test stresses auto-creation of 5# Volumes and restores from a lot of Volumes. Note, it creates 6# writes and then reads something like 110 Volumes (will vary 7# depending on the size of the Bareos source). 8# 9TestName="maxbytes-test" 10JobName=maxbytes 11. scripts/functions 12 13scripts/cleanup 14scripts/copy-test-confs 15 16cp -f ${cwd}/bin/bareos-dir.conf ${cwd}/tmp/1 17sed "s%# Maximum Volume Bytes% Maximum Volume Bytes%" ${cwd}/tmp/1 >${cwd}/bin/bareos-dir.conf 18cp -f ${cwd}/bin/bareos-dir.conf ${cwd}/tmp/1 19sed "s%# Simple Label Format% Label Format%" ${cwd}/tmp/1 >${cwd}/bin/bareos-dir.conf 20 21change_jobname NightlySave $JobName 22 23# Directory to backup. 24# This directory will be created by setup_data(). 25BackupDirectory="${tmp}/data" 26 27# Use a tgz to setup data to be backuped. 28# Data will be placed at "${tmp}/data/". 29setup_data data/small.tgz 30 31# the default fileset FS_TESTJOB backups all file and directories defined in "${tmp}/file-list". 32echo "${BackupDirectory}" >${tmp}/file-list 33 34 35start_test 36 37cat <<END_OF_DATA >${cwd}/tmp/bconcmds 38@$out /dev/null 39messages 40@$out ${cwd}/tmp/log1.out 41@#setdebug level=100 Storage=File1 42run job=$JobName level=Full 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 56@#reload 57@#reload 58messages 59quit 60END_OF_DATA 61 62run_bareos 63check_for_zombie_jobs storage=File1 64stop_bareos 65 66check_two_logs 67check_restore_diff 68end_test 69