1#!/bin/sh 2# 3# Run a simple backup 4# to a tape then restore it, we do that twice to ensure that 5# we can correctly append to a tape. 6# 7TestName="win32-backup-tape" 8JobName=win32tape 9. scripts/functions 10 11require_tape_drive 12 13scripts/copy-win32-confs 14scripts/cleanup-tape 15 16change_jobname $JobName 17 18# Directory to backup. 19# This directory will be created by setup_data(). 20BackupDirectory="${tmp}/data" 21 22# Use a tgz to setup data to be backuped. 23# Data will be placed at "${tmp}/data/". 24setup_data data/small.tgz 25 26# the default fileset FS_TESTJOB backups all file and directories defined in "${tmp}/file-list". 27echo "${BackupDirectory}" >${tmp}/file-list 28 29 30start_test 31 32cat <<END_OF_DATA >tmp/bconcmds 33@$out /dev/null 34messages 35@$out tmp/log1.out 36label storage=tape volume=TestVolume001 slot=0 pool=Default drive=0 37run job=$JobName yes 38@sleep 10 39status storage=tape 40@sleep 30 41messages 42wait 43messages 44@# 45@# now do a restore 46@# 47@$out tmp/log2.out 48restore where=${cwd}/tmp/bareos-restores select all storage=tape done 49yes 50wait 51messages 52END_OF_DATA 53 54run_bareos 55check_for_zombie_jobs storage=tape 56stop_bareos 57 58check_two_logs 59# no diff for now 60dstat=0 61end_test 62