3 # Test of ANSI labeled tapes
5 # Run a simple backup of the Bacula build directory
6 # to a tape then restore it, we do that twice to ensure that
7 # we can correctly append to a tape.
8 # We also use the purge and the relabel commands as
9 # well as a pile of status storage commands.
11 TestName="ansi-label-1t1d-tape"
17 scripts/copy-tape-confs
18 /bin/cp -f scripts/ansi-sd-tape.conf bin/bacula-sd.conf
21 echo "${cwd}/build" >${cwd}/tmp/file-list
23 change_jobname NightlySave $JobName
26 # Write out bconsole commands
27 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
30 @$out ${cwd}/tmp/log1.out
31 @#setdebug level=200 storage=DDS-4
32 label storage=DDS-4 volume=Vol001 slot=0 pool=Default
34 relabel pool=Default storage=DDS-4 oldVolume=Vol001 volume=Vol002 slot=0
36 relabel pool=Default storage=DDS-4 oldVolume=Vol002 volume=Vol001 slot=0
45 @$out ${cwd}/tmp/log2.out
46 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
54 check_for_zombie_jobs storage=DDS-4
58 # Now do a second backup after making a few changes
60 touch ${cwd}/build/src/dird/*.c
61 echo "test test" > ${cwd}/build/src/dird/xxx
63 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
66 @$out ${cwd}/tmp/log1.out
68 @#setdebug level=300 storage=DDS-4
74 @# now do a second restore
76 @$out ${cwd}/tmp/log2.out
78 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
88 check_for_zombie_jobs storage=DDS-4