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"
15 scripts/copy-tape-confs
16 /bin/cp -f scripts/ansi-sd-tape.conf bin/bacula-sd.conf
19 echo "${cwd}/build" >${cwd}/tmp/file-list
21 change_jobname NightlySave $JobName
24 # Write out bconsole commands
25 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
28 @$out ${cwd}/tmp/log1.out
29 @#setdebug level=200 storage=DDS-4
30 label storage=DDS-4 volume=Vol001 slot=0 pool=Default
32 relabel pool=Default storage=DDS-4 oldVolume=Vol001 volume=Vol002 slot=0
34 relabel pool=Default storage=DDS-4 oldVolume=Vol002 volume=Vol001 slot=0
43 @$out ${cwd}/tmp/log2.out
44 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
52 check_for_zombie_jobs storage=DDS-4
56 # Now do a second backup after making a few changes
58 touch ${cwd}/build/src/dird/*.c
59 echo "test test" > ${cwd}/build/src/dird/xxx
61 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
64 @$out ${cwd}/tmp/log1.out
66 @#setdebug level=300 storage=DDS-4
72 @# now do a second restore
74 @$out ${cwd}/tmp/log2.out
76 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
86 check_for_zombie_jobs storage=DDS-4