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="backup-win32-tape" 8JobName=backupwintape 9. scripts/functions 10 11require_tape_drive_drive 12 13scripts/cleanup-tape 14scripts/copy-win32-confs 15 16# Directory to backup. 17# This directory will be created by setup_data(). 18BackupDirectory="${tmp}/data" 19 20# Use a tgz to setup data to be backuped. 21# Data will be placed at "${tmp}/data/". 22setup_data data/small.tgz 23 24change_jobname $JobName 25start_test 26 27cat <<END_OF_DATA >${cwd}/tmp/bconcmds 28@$out /dev/null 29messages 30@$out ${cwd}/tmp/log1.out 31label storage=tape volume=TestVolume001 slot=0 pool=Default 32run job=NightlySave yes 33@sleep 10 34status storage=tape 35@sleep 30 36messages 37wait 38messages 39@# 40@# now do a restore 41@# 42@$outt ${cwd}/tmp/log2.out 43@#restore where=${cwd}/tmp/bareos-restores select all storage=tape done 44@#yes 45@#wait 46@#messages 47END_OF_DATA 48 49run_bareos 50check_for_zombie_jobs storage=tape 51stop_bareos 52 53check_two_logs 54check_restore_diff "$BackupDirectory" 55end_test 56