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-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=tape
32 label storage=tape volume=Vol001 slot=0 pool=Default
34 relabel pool=Default storage=tape oldVolume=Vol001 volume=Vol002 slot=0
36 relabel pool=Default storage=tape oldVolume=Vol002 volume=Vol001 slot=0
45 @$out ${cwd}/tmp/log2.out
46 setdebug level=200 storage=tape
47 restore where=${cwd}/tmp/bacula-restores select all storage=tape done
55 check_for_zombie_jobs storage=tape
59 # Now do a second backup after making a few changes
61 touch ${cwd}/build/src/dird/*.c
62 echo "test test" > ${cwd}/build/src/dird/xxx
64 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
67 @$out ${cwd}/tmp/log1.out
69 @#setdebug level=300 storage=tape
75 @# now do a second restore
77 @$out ${cwd}/tmp/log2.out
79 restore where=${cwd}/tmp/bacula-restores select all storage=tape done
88 check_for_zombie_jobs storage=tape