#!/bin/sh
#
-# Run full tape tests
+# Run full tape tests assumes you have an autochanger
#
. ./config
fi
echo " "
echo " " >>test.out
-echo "Start all non-root tape tests"
-echo "Start all non-root tape tests" >>test.out
+echo "Start full tape tests"
+echo "Start full tape tests" >>test.out
+
+# Non-autochanger tests
nice tests/ansi-label-tape
nice tests/backup-bacula-tape
nice tests/bscan-tape
nice tests/truncate-bug-tape
nice tests/verify-vol-tape
+# Autochanger tests
+nice tests/2drive-incremental-changer
+nice tests/bad-label-changer
+nice tests/incremental-changer
+nice tests/two-pool-changer
+nice tests/two-volume-changer
+nice tests/vol-duration-changer
+
# very long
# nice tests/btape-fill-full-tape
#
Device {
- Name = DDS-4 #
- Media Type = DDS-4
+ Name = tape #
+ Media Type = tape
Archive Device = @tape_drive@
AutomaticMount = yes; # when device opened, read it
AlwaysOpen = yes;
Type = Backup
Client=@hostname@-fd
FileSet="Full Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "@working_dir@/NightlySave.bsr"
Type = Backup
Client=@hostname@-fd1
FileSet="Full Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "@working_dir@/NightlySave.bsr"
Type = Backup
Client=@hostname@-fd
FileSet="Full Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "@working_dir@/NightlySave.bsr"
Type = Backup
Client=@hostname@-fd
FileSet="Full Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "@working_dir@/NightlySave.bsr"
Level = VolumeToCatalog
Client=@hostname@-fd
FileSet="Verify Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "@working_dir@/NightlySave.bsr"
Type = Restore
Client=@hostname@-fd
FileSet="Full Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Where = @tmpdir@/bacula-restores
# Definition of DDS tape storage device
Storage {
- Name = DDS-4
+ Name = tape
Address = @hostname@ # N.B. Use a fully qualified name here
SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
- Device = DDS-4 # must be same as Device in Storage daemon
- Media Type = DDS-4 # must be same as MediaType in Storage daemon
+ Device = tape # must be same as Device in Storage daemon
+ Media Type = tape # must be same as MediaType in Storage daemon
Maximum Concurrent Jobs = 4
# Autochanger = yes
}
Type = Backup
Client=@hostname@-fd
FileSet="Full Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "@working_dir@/NightlySave.bsr"
Type = Restore
Client=@hostname@-fd
FileSet="Full Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Where = @tmpdir@/bacula-restores
# Definition of DDS tape storage device
Storage {
- Name = DDS-4
+ Name = tape
Address = @hostname@ # N.B. Use a fully qualified name here
SDPort = @sdport@
Password = "storage-pw"
- Device = DDS-4 # must be same as Device in Storage daemon
- Media Type = DDS-4 # must be same as MediaType in Storage daemon
+ Device = tape # must be same as Device in Storage daemon
+ Media Type = tape # must be same as MediaType in Storage daemon
Maximum Concurrent Jobs = 4
Autochanger = yes
}
Type = Backup
Client = @hostname@-fd
FileSet="Full Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "@working_dir@/NightlySave.bsr"
Type = Backup
Client = @hostname@-fd
FileSet="Full Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "@working_dir@/NightlySave.bsr"
Type = Backup
Client=@hostname@-fd
FileSet="Full Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "@working_dir@/NightlySave.bsr"
Level = VolumeToCatalog
Client=@hostname@-fd
FileSet="Verify Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "@working_dir@/NightlySave.bsr"
Type = Restore
Client=@hostname@-fd
FileSet="Full Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Where = @tmpdir@/bacula-restores
# Definition of DDS tape storage device
Storage {
- Name = DDS-4
+ Name = tape
Address = @hostname@ # N.B. Use a fully qualified name here
SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
- Device = DDS-4 # must be same as Device in Storage daemon
- Media Type = DDS-4 # must be same as MediaType in Storage daemon
+ Device = tape # must be same as Device in Storage daemon
+ Media Type = tape # must be same as MediaType in Storage daemon
Maximum Concurrent Jobs = 100
# Autochanger = yes
}
Type = Backup
Client=@win32_client@
FileSet="Full Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "@working_dir@/NightlySave.bsr"
Type = Restore
Client=@win32_client@
FileSet="Full Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Where = @tmpdir@/bacula-restores
# Definition of DDS tape storage device
Storage {
- Name = DDS-4
+ Name = tape
Address = @hostname@-sd # N.B. Use a fully qualified name here
SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
- Device = DDS-4 # must be same as Device in Storage daemon
- Media Type = DDS-4 # must be same as MediaType in Storage daemon
+ Device = tape # must be same as Device in Storage daemon
+ Media Type = tape # must be same as MediaType in Storage daemon
AutoChanger = yes
Maximum Concurrent Jobs = 4
}
# same Name and MediaType.
#
Autochanger {
- Name = DDS-4
+ Name = tape
Changer Device = @autochanger@
Changer Command ="@scriptdir@/@changer_script@ %c %o %S %a %d"
Device = Drive-0
Device {
Name = Drive-0
- Media Type = DDS-4
+ Media Type = tape
Archive Device = @tape_drive@
AutomaticMount = yes; # when device opened, read it
Autochanger = yes
# same Name and MediaType.
#
Autochanger {
- Name = DDS-4
+ Name = tape
Changer Device = @disk_drive@/conf
Changer Command ="@scriptdir@/disk-changer %c %o %S %a %d"
Device = Drive-0, Drive-1
Device {
Name = Drive-0
Device Type = File
- Media Type = DDS-4
+ Media Type = tape
Archive Device = @disk_drive@/drive0
AutomaticMount = yes; # when device opened, read it
Autochanger = yes
Device {
Name = Drive-1
Device Type = File
- Media Type = DDS-4
+ Media Type = tape
Archive Device = @disk_drive@/drive1
AutomaticMount = yes; # when device opened, read it
Autochanger = yes
# same Name and MediaType.
#
Autochanger {
- Name = DDS-4
+ Name = tape
Changer Device = @disk_drive@/conf
Changer Command ="@scriptdir@/disk-changer %c %o %S %a %d"
Device = Drive-0, Drive-1
Device {
Name = Drive-0 #
Device Type = File
- Media Type = DDS-4
+ Media Type = tape
Archive Device = @disk_drive@/drive0
AutomaticMount = yes; # when device opened, read it
Autochanger = yes
Device {
Name = Drive-1 #
Device Type = File
- Media Type = DDS-4
+ Media Type = tape
Archive Device = @disk_drive@/drive1
AutomaticMount = yes; # when device opened, read it
Autochanger = yes
# same Name and MediaType.
#
Autochanger {
- Name = DDS-4
+ Name = tape
Changer Device = @autochanger@
Changer Command ="@scriptdir@/@changer_script@ %c %o %S %a %d"
Device = Drive-0, Drive-1
Device {
Name = Drive-0
- Media Type = DDS-4
+ Media Type = tape
Archive Device = @tape_drive@
AutomaticMount = yes; # when device opened, read it
Autochanger = yes
Device {
Name = Drive-1
- Media Type = DDS-4
+ Media Type = tape
Archive Device = @tape_drive1@
AutomaticMount = yes; # when device opened, read it
Autochanger = yes
# same Name and MediaType.
#
Autochanger {
- Name = DDS-4
+ Name = tape
Changer Device = @autochanger@
Changer Command ="@scriptdir@/@changer_script@ %c %o %S %a %d"
Device = Drive-0
Device {
Name = Drive-0 #
- Media Type = DDS-4
+ Media Type = tape
Archive Device = @tape_drive@
AutomaticMount = yes; # when device opened, read it
Autochanger = yes
#
Device {
- Name = DDS-4 #
- Media Type = DDS-4
+ Name = tape #
+ Media Type = tape
Archive Device = @tape_drive@
AutomaticMount = yes; # when device opened, read it
AlwaysOpen = yes;
}
#Device {
-# Name = DDS-4 #
-# Media Type = DDS-4
+# Name = tape #
+# Media Type = tape
# Archive Device = /dev/nst0
# AutomaticMount = yes; # when device opened, read it
# AlwaysOpen = yes;
run_btape()
{
if test "$debug" -eq 1 ; then
- cat ${tmp}/bconcmds | ${bin}/btape -c ${conf}/bacula-sd.conf DDS-4 | tee ${tmp}/log1.out
+ cat ${tmp}/bconcmds | ${bin}/btape -c ${conf}/bacula-sd.conf tape | tee ${tmp}/log1.out
else
- cat ${tmp}/bconcmds | ${bin}/btape -c ${conf}/bacula-sd.conf DDS-4 >${tmp}/log1.out 2>&1
+ cat ${tmp}/bconcmds | ${bin}/btape -c ${conf}/bacula-sd.conf tape >${tmp}/log1.out 2>&1
fi
}
# SDPort = @sdport@
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
# Device = SDT-10000 # must be same as Device in Storage daemon
-# Media Type = DDS-4 # must be same as MediaType in Storage daemon
+# Media Type = tape # must be same as MediaType in Storage daemon
#}
# Definition of 8mm tape storage device
# SDPort = @sdport@
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
# Device = SDT-10000 # must be same as Device in Storage daemon
-# Media Type = DDS-4 # must be same as MediaType in Storage daemon
+# Media Type = tape # must be same as MediaType in Storage daemon
#}
# Definition of 8mm tape storage device
# SDPort = @sdport@
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
# Device = SDT-10000 # must be same as Device in Storage daemon
-# Media Type = DDS-4 # must be same as MediaType in Storage daemon
+# Media Type = tape # must be same as MediaType in Storage daemon
#}
# Definition of 8mm tape storage device
# SDPort = @sdport@
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
# Device = SDT-10000 # must be same as Device in Storage daemon
-# Media Type = DDS-4 # must be same as MediaType in Storage daemon
+# Media Type = tape # must be same as MediaType in Storage daemon
#}
# Definition of 8mm tape storage device
# SDPort = @sdport@
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
# Device = SDT-10000 # must be same as Device in Storage daemon
-# Media Type = DDS-4 # must be same as MediaType in Storage daemon
+# Media Type = tape # must be same as MediaType in Storage daemon
#}
# Definition of 8mm tape storage device
Type = Backup
Client=@win32_client@
FileSet="Full Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Write Bootstrap = "@working_dir@/NightlySave.bsr"
Type = Restore
Client=@win32_client@
FileSet="Full Set"
- Storage = DDS-4
+ Storage = tape
Messages = Standard
Pool = Default
Where = @tmpdir@/bacula-restores
# Definition of DDS tape storage device
Storage {
- Name = DDS-4
+ Name = tape
Address = @hostname@-sd # N.B. Use a fully qualified name here
SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
- Device = DDS-4 # must be same as Device in Storage daemon
- Media Type = DDS-4 # must be same as MediaType in Storage daemon
+ Device = tape # must be same as Device in Storage daemon
+ Media Type = tape # must be same as MediaType in Storage daemon
AutoChanger = yes
Maximum Concurrent Jobs = 4
}
#
Device {
- Name = DDS-4 #
- Media Type = DDS-4
+ Name = tape #
+ Media Type = tape
Archive Device = @tape_drive@
AutomaticMount = yes; # when device opened, read it
AlwaysOpen = yes;
messages
@$out ${cwd}/tmp/log1.out
setdebug level=3 dir
-setdebug level=3 storage=DDS-4
+setdebug level=3 storage=tape
setdebug level=3 client=$CLIENT
-label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=1
-# label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Default drive=1
-status storage=DDS-4
-setdebug level=120 storage=DDS-4
+label storage=tape volume=TestVolume001 slot=1 Pool=Default drive=1
+# label storage=tape volume=TestVolume002 slot=2 Pool=Default drive=1
+status storage=tape
+setdebug level=120 storage=tape
run job=NightlySave level=Full yes
@sleep 1
run job=NightlySave level=Full yes
@sleep 1
run job=NightlySave level=Full yes
@sleep 3
-status storage=DDS-4
+status storage=tape
wait
list volumes
list jobs
-status storage=DDS-4
+status storage=tape
messages
quit
END_OF_DATA
@$out ${cwd}/tmp/log1.out
@# Force Incremental on the second Volume
# update volume=TestVolume001 VolStatus=Used
-status storage=DDS-4
-@#setdebug level=120 storage=DDS-4
+status storage=tape
+@#setdebug level=120 storage=tape
run level=Incremental job=NightlySave yes
wait
list volumes
-status storage=DDS-4
+status storage=tape
messages
@#
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bconsole
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=2 Pool=Default drive=0
-label storage=DDS-4 volume=TestVolume002 slot=1 Pool=Default drive=1
-status storage=DDS-4
-@#unmount storage=DDS-4 drive=0
-@#unmount storage=DDS-4 drive=1
-@#mount storage=DDS-4 slot=2 drive=0
-@#mount storage=DDS-4 slot=1 drive=1
-status storage=DDS-4
-setdebug level=120 storage=DDS-4
+label storage=tape volume=TestVolume001 slot=2 Pool=Default drive=0
+label storage=tape volume=TestVolume002 slot=1 Pool=Default drive=1
+status storage=tape
+@#unmount storage=tape drive=0
+@#unmount storage=tape drive=1
+@#mount storage=tape slot=2 drive=0
+@#mount storage=tape slot=1 drive=1
+status storage=tape
+setdebug level=120 storage=tape
run job=$JobName level=Full yes
@sleep 2
run job=$JobName level=Full yes
-status storage=DDS-4
+status storage=tape
wait
list volumes
list jobs
-status storage=DDS-4
+status storage=tape
messages
quit
END_OF_DATA
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-@#unmount storage=DDS-4 drive=0
-@#unmount storage=DDS-4 drive=1
-@#mount storage=DDS-4 slot=1 drive=0
-@#mount storage=DDS-4 slot=2 drive=1
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+@#unmount storage=tape drive=0
+@#unmount storage=tape drive=1
+@#mount storage=tape slot=1 drive=0
+@#mount storage=tape slot=2 drive=1
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bconsole
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-setdebug level=51 storage=DDS-4
-label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
-label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Full drive=1
-@#label storage=DDS-4 volume=TestVolume003 slot=3 Pool=Inc drive=2
-status storage=DDS-4
+setdebug level=51 storage=tape
+label storage=tape volume=TestVolume001 slot=1 Pool=Default drive=0
+label storage=tape volume=TestVolume002 slot=2 Pool=Full drive=1
+@#label storage=tape volume=TestVolume003 slot=3 Pool=Inc drive=2
+status storage=tape
@#run job=$JobName level=Full Pool=Inc yes
run job=$JobName level=Full Pool=Full yes
run job=$JobName level=Full Pool=Default yes
-setdebug level=200 storage=DDS-4
+setdebug level=200 storage=tape
run job=$JobName level=Full Pool=Default yes
run job=$JobName level=Full Pool=Default yes
@sleep 10
-status storage=DDS-4
+status storage=tape
list volumes
wait
list volumes
list jobs
-status storage=DDS-4
+status storage=tape
messages
quit
END_OF_DATA
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
run_bconsole
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label pool=Default storage=DDS-4 volume=TestVolume001 slot=1 drive=0
-label pool=Default storage=DDS-4 volume=TestVolume002 slot=2 drive=1
+label pool=Default storage=tape volume=TestVolume001 slot=1 drive=0
+label pool=Default storage=tape volume=TestVolume002 slot=2 drive=1
update Volume=TestVolume001 MaxVolBytes=100000000
@#50000000
@#12
-setdebug level=200 Storage=DDS-4
-status storage=DDS-4
+setdebug level=200 Storage=tape
+status storage=tape
list jobs
list volumes
-run job=$JobName level=Full Storage=DDS-4
+run job=$JobName level=Full Storage=tape
yes
@#reload
list jobs
list volumes
-run job=$JobName level=Full Storage=DDS-4
+run job=$JobName level=Full Storage=tape
yes
@#reload
list jobs
list volumes
-run job=$JobName level=Full Storage=DDS-4
+run job=$JobName level=Full Storage=tape
yes
@#reload
list jobs
list volumes
-status storage=DDS-4
-run job=$JobName level=Full Storage=DDS-4
+status storage=tape
+run job=$JobName level=Full Storage=tape
yes
-status storage=DDS-4
+status storage=tape
@#reload
@#reload
@#reload
@#reload
@sleep 2
status dir
-status storage=DDS-4
+status storage=tape
@#reload
@sleep 5
list jobs
@#reload
@#reload
wait
-status storage=DDS-4
+status storage=tape
@#reload
messages
@#
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-status storage=DDS-4
-restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
+status storage=tape
+restore where=${cwd}/tmp/bacula-restores select storage=tape
unmark *
mark *
done
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
messages
@$out ${cwd}/tmp/log1.out
setdebug level=3 dir
-setdebug level=3 storage=DDS-4
+setdebug level=3 storage=tape
setdebug level=3 client=2drive2disk
-label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
-label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Default drive=1
-status storage=DDS-4
-setdebug level=200 storage=DDS-4
+label storage=tape volume=TestVolume001 slot=1 Pool=Default drive=0
+label storage=tape volume=TestVolume002 slot=2 Pool=Default drive=1
+status storage=tape
+setdebug level=200 storage=tape
run job=NightlySave yes
run job=NightlySave yes
run job=NightlySave yes
run job=NightlySave yes
run job=NightlySave yes
wait jobid=2
-status storage=DDS-4
+status storage=tape
list volumes
list jobs
messages
wait
list volumes
list jobs
-status storage=DDS-4
+status storage=tape
messages
quit
END_OF_DATA
@$out ${cwd}/tmp/log1.out
@# Force Incremental on the second Volume
update volume=TestVolume001 VolStatus=Used
-status storage=DDS-4
+status storage=tape
list volumes
-@#setdebug level=120 storage=DDS-4
+@#setdebug level=120 storage=tape
run level=Incremental job=NightlySave yes
wait
list volumes
-status storage=DDS-4
+status storage=tape
messages
@#
@# now do a restore
run_bconsole
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=$SLOT1 Pool=Default drive=$DRIVE1
-label storage=DDS-4 volume=TestVolume002 slot=$SLOT2 Pool=Default drive=$DRIVE2
-@#setdebug level=100 storage=DDS-4
+label storage=tape volume=TestVolume001 slot=$SLOT1 Pool=Default drive=$DRIVE1
+label storage=tape volume=TestVolume002 slot=$SLOT2 Pool=Default drive=$DRIVE2
+@#setdebug level=100 storage=tape
run job=NightlySave yes
run job=NightlySave yes
run job=NightlySave yes
run job=NightlySave yes
run job=NightlySave yes
@sleep 3
-status storage=DDS-4
+status storage=tape
wait
list volumes
list jobs
-status storage=DDS-4
+status storage=tape
messages
quit
END_OF_DATA
@$out ${cwd}/tmp/log1.out
@# Force Incremental on the second Volume
update volume=TestVolume001 VolStatus=Used
-status storage=DDS-4
-@#setdebug level=400 storage=DDS-4
+status storage=tape
+@#setdebug level=400 storage=tape
run level=Incremental job=NightlySave yes
wait
list volumes
-status storage=DDS-4
+status storage=tape
messages
@#
@# now do a restore
END_OF_DATA
run_bconsole
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=2 Pool=Default drive=0
-label storage=DDS-4 volume=TestVolume002 slot=1 Pool=Default drive=1
-status storage=DDS-4
-setdebug level=120 storage=DDS-4
+label storage=tape volume=TestVolume001 slot=2 Pool=Default drive=0
+label storage=tape volume=TestVolume002 slot=1 Pool=Default drive=1
+status storage=tape
+setdebug level=120 storage=tape
run job=Offline level=Full yes
@sleep 2
run job=$JobName level=Full yes
-status storage=DDS-4
+status storage=tape
wait
list volumes
list jobs
-status storage=DDS-4
+status storage=tape
messages
quit
END_OF_DATA
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-@#unmount storage=DDS-4 drive=0
-@#unmount storage=DDS-4 drive=1
-@#mount storage=DDS-4 slot=1 drive=0
-@#mount storage=DDS-4 slot=2 drive=1
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+@#unmount storage=tape drive=0
+@#unmount storage=tape drive=1
+@#mount storage=tape slot=1 drive=0
+@#mount storage=tape slot=2 drive=1
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bconsole
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
-label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Default drive=1
-status storage=DDS-4
-@#setdebug level=120 storage=DDS-4
+label storage=tape volume=TestVolume001 slot=1 Pool=Default drive=0
+label storage=tape volume=TestVolume002 slot=2 Pool=Default drive=1
+status storage=tape
+@#setdebug level=120 storage=tape
run job=$JobName level=Full yes
@sleep 2
run job=$JobName level=Full yes
list volumes
list jobs
update volume=TestVolume001 maxvolbytes=40123123
-setdebug level=150 storage=DDS-4
+setdebug level=150 storage=tape
run job=$JobName level=Full yes
wait
list volumes
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bconsole
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-setdebug level=200 storage=DDS-4
-label storage=DDS-4 volume=Vol001 slot=0 pool=Default
+setdebug level=200 storage=tape
+label storage=tape volume=Vol001 slot=0 pool=Default
purge volume=Vol001
-relabel pool=Default storage=DDS-4 oldVolume=Vol001 volume=Vol002 slot=0
+relabel pool=Default storage=tape oldVolume=Vol001 volume=Vol002 slot=0
purge volume=Vol002
-relabel pool=Default storage=DDS-4 oldVolume=Vol002 volume=Vol001 slot=0
+relabel pool=Default storage=tape oldVolume=Vol002 volume=Vol001 slot=0
run job=$JobName yes
-status storage=DDS-4
+status storage=tape
@sleep 1
wait
messages
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-setdebug level=200 storage=DDS-4
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+setdebug level=200 storage=tape
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
list volumes
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
#
messages
@$out ${cwd}/tmp/log1.out
list volumes
-@#setdebug level=300 storage=DDS-4
+@#setdebug level=300 storage=tape
run job=$JobName yes
wait
list volumes
@#
@$out ${cwd}/tmp/log2.out
list volumes
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
list volumes
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-@#setdebug level=200 storage=DDS-4
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+@#setdebug level=200 storage=tape
+label storage=tape volume=TestVolume001 slot=0 pool=Default
purge volume=TestVolume001
-relabel pool=Default storage=DDS-4 oldVolume=TestVolume001 volume=TestVolume002 slot=0
+relabel pool=Default storage=tape oldVolume=TestVolume001 volume=TestVolume002 slot=0
purge volume=TestVolume002
-relabel pool=Default storage=DDS-4 oldVolume=TestVolume002 volume=TestVolume001 slot=0
+relabel pool=Default storage=tape oldVolume=TestVolume002 volume=TestVolume001 slot=0
run job=$JobName yes
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
+status storage=tape
+status storage=tape
+status storage=tape
+status storage=tape
+status storage=tape
+status storage=tape
@sleep 1
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
+status storage=tape
+status storage=tape
+status storage=tape
+status storage=tape
+status storage=tape
@sleep 1
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
+status storage=tape
+status storage=tape
+status storage=tape
+status storage=tape
+status storage=tape
@sleep 1
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
+status storage=tape
+status storage=tape
+status storage=tape
+status storage=tape
+status storage=tape
@sleep 1
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
-status storage=DDS-4
+status storage=tape
+status storage=tape
+status storage=tape
+status storage=tape
+status storage=tape
wait
messages
@#
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
list volumes
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
#
@#
@$out ${cwd}/tmp/log2.out
list volumes
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
list volumes
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+label storage=tape volume=TestVolume001 slot=0 pool=Default
run job=NightlySave yes
@sleep 10
-status storage=DDS-4
+status storage=tape
@sleep 30
messages
wait
@# now do a restore
@#
@$outt ${cwd}/tmp/log2.out
-@#restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+@#restore where=${cwd}/tmp/bacula-restores select all storage=tape done
@#yes
@#wait
@#messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out tmp/log1.out
-label storage=DDS-4 volume=TestVolume002 slot=$SLOT2 pool=Default drive=$DRIVE1
-label storage=DDS-4 volume=TestVolume001 slot=$SLOT1 pool=Default drive=$DRIVE1
+label storage=tape volume=TestVolume002 slot=$SLOT2 pool=Default drive=$DRIVE1
+label storage=tape volume=TestVolume001 slot=$SLOT1 pool=Default drive=$DRIVE1
list volumes
@#setdebug level=10 client=$CLIENT
-setdebug level=150 storage=DDS-4
+setdebug level=150 storage=tape
run job=$JobName yes
wait
purge volume=TestVolume001
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
# Overwrite TestVolume001 label
@$out /dev/null
messages
list volumes
-run job=$JobName level=Full storage=DDS-4 yes
+run job=$JobName level=Full storage=tape yes
wait
messages
@#
@# now do a restore
@#
@$out tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out tmp/log1.out
-setdebug level=2 storage=DDS-4
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+setdebug level=2 storage=tape
+label storage=tape volume=TestVolume001 slot=0 pool=Default
run job=$JobName yes
wait
messages
#quit
#END_OF_DATA
#run_bacula
-#check_for_zombie_jobs storage=DDS-4
+#check_for_zombie_jobs storage=tape
#stop_bacula
echo "End writing tape"
bscan_libdbi
-strace -o strace.new $bin/bscan -d200 -w working $BSCANLIBDBI -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4
+strace -o strace.new $bin/bscan -d200 -w working $BSCANLIBDBI -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf tape
exit
cat <<END_OF_DATA >tmp/bconcmds
@$out /dev/null
@#
@# now do a restore
@#
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
rm -f ${cwd}/build/src/lib/dummy
estimate job=$JobName listing
messages
@$out tmp/log1.out
-setdebug level=2 storage=DDS-4
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+setdebug level=2 storage=tape
+label storage=tape volume=TestVolume001 slot=0 pool=Default
run job=$JobName level=Full yes
wait
run job=$JobName level=Full yes
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
echo "Backup 1 done"
# make some files for the incremental to pick up
END_OF_DATA
run_bconsole
-scripts/check_for_zombie_jobs storage=DDS-4
+scripts/check_for_zombie_jobs storage=tape
echo "Backup 2 done"
touch ${cwd}/build/src/dird/*.c
#
run_bconsole
-scripts/check_for_zombie_jobs storage=DDS-4
+scripts/check_for_zombie_jobs storage=tape
echo "Backup 3 done"
# make some files for the incremental to pick up
#
run_bconsole
-scripts/check_for_zombie_jobs storage=DDS-4
+scripts/check_for_zombie_jobs storage=tape
stop_bacula
fi
if test "$debug" -eq 1 ; then
- $bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4
+ $bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf tape
else
- $bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 >/dev/null 2>&1
+ $bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf tape >/dev/null 2>&1
fi
echo $BSCANLIBDBI
@#
@# now do a restore
@#
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
rm -f ${cwd}/build/src/lib/dummy
if test "$debug" -eq 1 ; then
- $bin/btape -c bin/bacula-sd.conf DDS-4 <<END_OF_DATA | tee ${cwd}/tmp/log1.out
+ $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA | tee ${cwd}/tmp/log1.out
fill
m
quit
END_OF_DATA
else
- $bin/btape -c bin/bacula-sd.conf DDS-4 <<END_OF_DATA >${cwd}/tmp/log1.out 2>&1
+ $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA >${cwd}/tmp/log1.out 2>&1
fill
m
if test "$debug" -eq 1 ; then
- $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA
+ $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA | tee ${cwd}/tmp/log1.out
fill
s
--- /dev/null
+#!/bin/sh
+#
+# Test the test command in btape
+#
+TestName="btape-test-changer"
+JobName=btapechanger
+. scripts/functions
+
+
+require_tape_drive
+require_autochanger
+
+scripts/cleanup
+scripts/copy-2tape-confs
+
+change_jobname $JobName
+start_test
+
+if test "$debug" -eq 1 ; then
+ $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA | tee ${cwd}/tmp/log1.out
+test
+yes
+quit
+END_OF_DATA
+else
+ $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA >${cwd}/tmp/log1.out 2>&1
+test
+yes
+quit
+END_OF_DATA
+fi
+
+if [ $? != 0 ] ; then
+ echo " "
+ echo " "
+ echo " !!!!! btape-changer test failed!!! !!!!! "
+ echo " !!!!! btape-changer test failed!!! !!!!! " >>test.out
+ echo " "
+ exit 1
+fi
+
+#
+# Increase block size to 262144
+#
+cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
+sed -e 's%64512%262144%' ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
+
+if test "$debug" -eq 1 ; then
+ $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA | tee ${cwd}/tmp/log2.out
+test
+yes
+quit
+END_OF_DATA
+else
+ $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA >${cwd}/tmp/log2.out 2>&1
+test
+yes
+quit
+END_OF_DATA
+fi
+
+if [ $? != 0 ] ; then
+ echo " "
+ echo " "
+ echo " !!!!! btape-changer test failed!!! !!!!! "
+ echo " !!!!! btape-changer test failed!!! !!!!! " >>test.out
+ echo " "
+else
+ echo " ===== btape-changer test OK ===== "
+ echo " ===== btape-changer test OK ===== " >>test.out
+ scripts/cleanup
+fi
start_test
if test "$debug" -eq 1 ; then
- $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA
+ $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA | tee ${cwd}/tmp/log1.out
test
quit
END_OF_DATA
if [ $? != 0 ] ; then
echo " "
echo " "
- echo " !!!!! btape fill test failed!!! !!!!! "
- echo " !!!!! btape fill test failed!!! !!!!! " >>test.out
+ echo " !!!!! btape test failed!!! !!!!! "
+ echo " !!!!! btape test failed!!! !!!!! " >>test.out
echo " "
exit 1
fi
sed -e 's%64512%262144%' ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
if test "$debug" -eq 1 ; then
- $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA
+ $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA | tee ${cwd}/tmp/log2.out
test
quit
END_OF_DATA
else
- $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA >${cwd}/tmp/log1.out 2>&1
+ $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA >${cwd}/tmp/log2.out 2>&1
test
quit
END_OF_DATA
if [ $? != 0 ] ; then
echo " "
echo " "
- echo " !!!!! btape fill test failed!!! !!!!! "
- echo " !!!!! btape fill test failed!!! !!!!! " >>test.out
+ echo " !!!!! btape test failed!!! !!!!! "
+ echo " !!!!! btape test failed!!! !!!!! " >>test.out
echo " "
else
- echo " ===== btape fill test OK ===== "
- echo " ===== btape fill test OK ===== " >>test.out
-# scripts/cleanup
+ echo " ===== btape test OK ===== "
+ echo " ===== btape test OK ===== " >>test.out
+ scripts/cleanup
fi
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+label storage=tape volume=TestVolume001 slot=0 pool=Default
messages
END_OF_DATA
run job=$JobName yes
@sleep 10
messages
-setdebug level=400 storage=DDS-4 trace=1
+setdebug level=400 storage=tape trace=1
setdebug level=400 director trace=1
-label storage=DDS-4 volume=TestVolume002 slot=0 pool=Default
+label storage=tape volume=TestVolume002 slot=0 pool=Default
messages
@sleep 5
-mount storage=DDS-4 slot=0
+mount storage=tape slot=0
@sleep 2
messages
@sleep 2
-mount storage=DDS-4 slot=0
+mount storage=tape slot=0
@sleep 2
messages
cancel jobid=1
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
touch ${cwd}/tmp/log2.out
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
-setdebug level=60 Storage=DDS-4
+label storage=tape volume=TestVolume001 slot=0 pool=Default
+setdebug level=60 Storage=tape
setdebug level=60 client
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
@sleep 2
status dir
@sleep 5
status dir
-status storage=DDS-4
+status storage=tape
messages
wait
messages
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
+restore where=${cwd}/tmp/bacula-restores select storage=tape
unmark *
mark *
done
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+label storage=tape volume=TestVolume001 slot=0 pool=Default
@#update Volume=TestVolume001 MaxVolBytes=3000000
run job=$JobName yes
wait
@# now do a restore
@#
@$out tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-@#setdebug level=150 storage=DDS-4
-label storage=DDS-4 volume=TestVolume001 slot=1 pool=Full drive=0
-label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
+@#setdebug level=150 storage=tape
+label storage=tape volume=TestVolume001 slot=1 pool=Full drive=0
+label storage=tape volume=TestVolume002 slot=2 pool=Default drive=0
list volumes
@# Start job with Client run before and sleep
run job=NightlySave1 level=Full pool=Default yes
run job=NightlySave1 level=Full pool=Default yes
@# wait between starting jobs
@sleep 10
-@#setdebug level=100 storage=DDS-4
+@#setdebug level=100 storage=tape
run job=NightlySave1 level=Full pool=Full yes
run job=NightlySave1 level=Full pool=Full yes
-status storage=DDS-4
+status storage=tape
messages
wait
list volumes
@$out ${cwd}/tmp/log2.out
list volumes
list jobs
-status storage=DDS-4
+status storage=tape
messages
-setdebug level=150 storage=DDS-4
+setdebug level=150 storage=tape
@#setdebug level=200 client
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
# exit
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-setdebug level=51 storage=DDS-4
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+setdebug level=51 storage=tape
+label storage=tape volume=TestVolume001 slot=0 pool=Default
run job=$JobName yes
wait
messages
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
+restore where=${cwd}/tmp/bacula-restores select storage=tape
unmark *
mark *
done
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
-run job=$JobName level=Full Storage=DDS-4 yes
+label storage=tape volume=TestVolume001 slot=0 pool=Default
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
+run job=$JobName level=Full Storage=tape yes
@sleep 2
status dir
@sleep 5
status dir
-status storage=DDS-4
+status storage=tape
messages
wait
messages
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
+restore where=${cwd}/tmp/bacula-restores select storage=tape
unmark *
mark *
done
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
estimate job=$JobName
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+label storage=tape volume=TestVolume001 slot=0 pool=Default
run job=$JobName yes
wait
messages
END_OF_DATA
run_bacula
-scripts/check_for_zombie_jobs storage=DDS-4
+scripts/check_for_zombie_jobs storage=tape
echo "Backup 1 done"
# make some files for the incremental to pick up
touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
run_bacula
-scripts/check_for_zombie_jobs storage=DDS-4
+scripts/check_for_zombie_jobs storage=tape
echo "Backup 2 done"
touch ${cwd}/build/src/dird/*.c
touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
run_bacula
-scripts/check_for_zombie_jobs storage=DDS-4
+scripts/check_for_zombie_jobs storage=tape
echo "Backup 3 done"
# make some files for the incremental to pick up
touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
END_OF_DATA
run_bacula
-scripts/check_for_zombie_jobs storage=DDS-4
+scripts/check_for_zombie_jobs storage=tape
echo "Backup 4 done"
#
# now do several restores to ensure we cleanup between jobs
@# now unmount the tape and start two restores
@# at the same time
@#
-unmount storage=DDS-4
+unmount storage=tape
restore where=${cwd}/tmp/bacula-restores select all done
yes
restore where=${cwd}/tmp/bacula-restores select
mark *
done
yes
-mount storage=DDS-4
+mount storage=tape
wait
messages
quit
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
-label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Default drive=0
+label storage=tape volume=TestVolume001 slot=1 Pool=Default drive=0
+label storage=tape volume=TestVolume002 slot=2 Pool=Default drive=0
run job=$JobName yes
wait
messages
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
+label storage=tape volume=TestVolume001 slot=1 Pool=Default drive=0
label storage=File volume=TestVolume002 Pool=Default
run job=$JobName yes
wait
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-setdebug level=151 storage=DDS-4
+setdebug level=151 storage=tape
restore where=${cwd}/tmp/bacula-restores select all done
yes
wait
restore where=${cwd}/tmp/bacula-restores select all done
yes
wait
-status storage=DDS-4
+status storage=tape
messages
quit
END_OF_DATA
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=$SLOT1 Pool=Default drive=$DRIVE1
+label storage=tape volume=TestVolume001 slot=$SLOT1 Pool=Default drive=$DRIVE1
label storage=DLT80 volume=TestVolume002 Pool=Default
run job=$JobName yes
wait
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-setdebug level=51 storage=DDS-4
+setdebug level=51 storage=tape
restore where=${cwd}/tmp/bacula-restores select all done
yes
wait
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=$SLOT1 Pool=Default drive=$DRIVE1
-label storage=DDS-4 volume=TestVolume002 slot=$SLOT2 Pool=Default drive=$DRIVE1
+label storage=tape volume=TestVolume001 slot=$SLOT1 Pool=Default drive=$DRIVE1
+label storage=tape volume=TestVolume002 slot=$SLOT2 Pool=Default drive=$DRIVE1
run job=NightlySave yes
wait
messages
run_bconsole
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
rstat=$?
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+label storage=tape volume=TestVolume001 slot=0 pool=Default
run job=$JobName yes
wait
messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores storage=DDS-4
+restore where=${cwd}/tmp/bacula-restores storage=tape
7
<${cwd}/tmp/restore-list
END_OF_DATA
run_bconsole
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
#
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 Volume=TestVolume001 slot=0
+label storage=tape Volume=TestVolume001 slot=0
run job=NightlySave yes
wait
messages
@out /dev/null
messages
@$out tmp/log1.out
-label storage=DDS-4 volume=TestVolume002 slot=0 pool=Default drive=0
-unmount storage=DDS-4
+label storage=tape volume=TestVolume002 slot=0 pool=Default drive=0
+unmount storage=tape
quit
END_OF_DATA
# label first volume, and run first half of job
cat <<END_OF_DATA >tmp/bconcmds
@$out tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default drive=0
+label storage=tape volume=TestVolume001 slot=0 pool=Default drive=0
update Volume=TestVolume001 MaxVolBytes=500000 pool=Default drive=0
list volumes
-@#setdebug level=150 storage=DDS-4
+@#setdebug level=150 storage=tape
run job=$JobName yes
@# This sleep must be long enough for the first tape to fill (4MB)
@# otherwise the following mtx-changer commands will fail
@#sleep $sleep
wait mount timeout=180
list volumes
-unmount storage=DDS-4
+unmount storage=tape
list volumes
-status storage=DDS-4
+status storage=tape
messages
quit
END_OF_DATA
cat <<END_OF_DATA >tmp/bconcmds
@$out tmp/log1.out
wait mount timeout=180
-setdebug level=200 storage=DDS-4
-mount storage=DDS-4
+setdebug level=200 storage=tape
+mount storage=tape
@# backup should continue
wait
list volumes
@#
@# now do a restore
@#
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
@sleep $sleep
wait mount timeout=180
exec "sh -c 'load_other_slot $slot'"
-unmount storage=DDS-4
+unmount storage=tape
list volumes
messages
wait
touch tmp/log2.out
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
-run job=$JobName level=Full Storage=DDS-4 yes
+label storage=tape volume=TestVolume001 slot=0 pool=Default
+run job=$JobName level=Full Storage=tape yes
sql
SELECT * from File;
SELECT * from File;
status dir
@sleep 5
status dir
-status storage=DDS-4
+status storage=tape
messages
wait
messages
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
+restore where=${cwd}/tmp/bacula-restores select storage=tape
unmark *
mark *
done
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 Pool=Default slot=1 drive=0
+label storage=tape volume=TestVolume001 Pool=Default slot=1 drive=0
label storage=File volume=TestVolume002 Pool=Default
-run job=$JobName storage=DDS-4 yes
+run job=$JobName storage=tape yes
wait
messages
quit
run_bconsole
check_for_zombie_jobs storage=File
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
$tmp/bacula-ctl-sd stop &> /dev/null
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-setdebug level=150 storage=DDS-4
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+setdebug level=150 storage=tape
+label storage=tape volume=TestVolume001 slot=0 pool=Default
run job=$JobName level=Full yes
wait
messages
-add pool=Default storage=DDS-4
+add pool=Default storage=tape
0
TestVolume002
@# set status to append
run job=$JobName level=Full yes
wait
list volumes
-unmount storage=DDS-4
-unmount storage=DDS-4
+unmount storage=tape
+unmount storage=tape
purge volume=TestVolume001
-relabel oldvolume=TestVolume001 volume=TestVolume003 slot=0 pool=Default storage=DDS-4
+relabel oldvolume=TestVolume001 volume=TestVolume003 slot=0 pool=Default storage=tape
list volumes
-mount storage=DDS-4
+mount storage=tape
messages
wait
run job=$JobName level=Full yes
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
echo "Backup done"
#
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out ${cwd}/tmp/log2.out
-setdebug level=150 storage=DDS-4
+setdebug level=150 storage=tape
list volumes
restore where=${cwd}/tmp/bacula-restores select all done
yes
@# at the same time
@#
list volumes
-unmount storage=DDS-4
+unmount storage=tape
restore where=${cwd}/tmp/bacula-restores select all done
yes
restore where=${cwd}/tmp/bacula-restores select
mark *
done
yes
-mount storage=DDS-4
+mount storage=tape
wait
messages
quit
run_bconsole
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+label storage=tape volume=TestVolume001 slot=0 pool=Default
run job=$JobName level=Full yes
wait
messages
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores storage=DDS-4 file=<${cwd}/tmp/restore2-list
+restore where=${cwd}/tmp/bacula-restores storage=tape file=<${cwd}/tmp/restore2-list
yes
wait
messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
dstat=0
# test appending to a previously written tape
#
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
-scripts/check_for_zombie_jobs storage=DDS-4
+scripts/check_for_zombie_jobs storage=tape
stop_bacula
for i in `cat ${cwd}/tmp/restore2-list`; do
diff $i ${cwd}/tmp/bacula-restores$i
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 pool=Default
+label storage=tape volume=TestVolume001 pool=Default
run job=$JobName yes
wait
messages
@#
@$out ${cwd}/tmp/log2.out
setdebug level=30 fd
-setdebug level=10 storage=DDS-4
+setdebug level=10 storage=tape
sql
@# print the JobMedia records
select * from JobMedia;
-restore bootstrap=${cwd}/tmp/kern.bsr where=${cwd}/tmp/bacula-restores storage=DDS-4
+restore bootstrap=${cwd}/tmp/kern.bsr where=${cwd}/tmp/bacula-restores storage=tape
7
<${cwd}/tmp/restore-list
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
# Now setup a control directory of only what we *should* restore
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=1 pool=Scratch drive=0
-label storage=DDS-4 volume=TestVolume002 slot=2 pool=Scratch drive=0
+label storage=tape volume=TestVolume001 slot=1 pool=Scratch drive=0
+label storage=tape volume=TestVolume002 slot=2 pool=Scratch drive=0
update Volume=TestVolume001 MaxVolBytes=2000000 pool=Scratch drive=0
update Volume=TestVolume001 inchanger=no pool=Scratch drive=0
-@#setdebug level=200 storage=DDS-4
+@#setdebug level=200 storage=tape
llist volume=TestVolume001
llist volume=TestVolume002
run job=$JobName yes
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=1 pool=SpecialScratch drive=0
-label storage=DDS-4 volume=TestVolume002 slot=2 pool=SpecialScratch drive=0
-label storage=DDS-4 volume=TestVolume003 slot=3 pool=Scratch drive=0
+label storage=tape volume=TestVolume001 slot=1 pool=SpecialScratch drive=0
+label storage=tape volume=TestVolume002 slot=2 pool=SpecialScratch drive=0
+label storage=tape volume=TestVolume003 slot=3 pool=Scratch drive=0
show pool=Default
show pool=Special
@########################
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
-setdebug level=2 storage=DDS-4
+label storage=tape volume=TestVolume001 slot=0 pool=Default
+setdebug level=2 storage=tape
run job=$JobName yes
wait
messages
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
+restore where=${cwd}/tmp/bacula-restores select storage=tape
unmark *
mark *
done
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-@#setdebug level=150 storage=DDS-4
-label storage=DDS-4 volume=TestVolume001 slot=1 pool=Full drive=0
-label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
-label storage=DDS-4 volume=TestVolume003 slot=3 pool=Scratch drive=0
+@#setdebug level=150 storage=tape
+label storage=tape volume=TestVolume001 slot=1 pool=Full drive=0
+label storage=tape volume=TestVolume002 slot=2 pool=Default drive=0
+label storage=tape volume=TestVolume003 slot=3 pool=Scratch drive=0
update Volume=TestVolume001 maxvoljobs=1
update Volume=TestVolume002 maxvoljobs=1
update Volume=TestVolume003 volretention=7s
list volumes
@# should recycle Scratch pool
run job=NightlySave2 level=Full pool=Full yes
-status storage=DDS-4
+status storage=tape
messages
wait
list volumes
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-@#setdebug level=200 storage=DDS-4
+@#setdebug level=200 storage=tape
@#setdebug level=200 client=$CLIENT
-label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
-label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Full drive=0
-label storage=DDS-4 volume=TestVolume003 slot=3 Pool=Inc drive=1
-status storage=DDS-4
+label storage=tape volume=TestVolume001 slot=1 Pool=Default drive=0
+label storage=tape volume=TestVolume002 slot=2 Pool=Full drive=0
+label storage=tape volume=TestVolume003 slot=3 Pool=Inc drive=1
+status storage=tape
run job=$JobName level=Full Pool=Default yes
run job=$JobName level=Full Pool=Default yes
run job=$JobName level=Full Pool=Default yes
run job=$JobName level=Full Pool=Default yes
run job=$JobName level=Full Pool=Default yes
@sleep 10
-status storage=DDS-4
+status storage=tape
list volumes
wait
list volumes
list jobs
-status storage=DDS-4
+status storage=tape
messages
quit
END_OF_DATA
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
run_bconsole
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+label storage=tape volume=TestVolume001 slot=0 pool=Default
@# do a bunch of saves so we have 12 files on the tape
@#setdebug level=100 dir
-setdebug level=100 storage=DDS-4
+setdebug level=100 storage=tape
run job=$JobName yes
run level=Full job=$JobName yes
run level=Full job=$JobName yes
END_OF_DATA
run_bacula
-scripts/check_for_zombie_jobs storage=DDS-4
+scripts/check_for_zombie_jobs storage=tape
cat <<END_OF_DATA >tmp/bconcmds
@$out /dev/null
@#
@# now do a restore
@#
-restore where=${cwd}/tmp/bacula-restores storage=DDS-4
+restore where=${cwd}/tmp/bacula-restores storage=tape
3
@# select JobId=4 (i.e. file five on the tape)
4
END_OF_DATA
run_bconsole
-scripts/check_for_zombie_jobs storage=DDS-4
+scripts/check_for_zombie_jobs storage=tape
# Now write to tape one more time
cat <<END_OF_DATA >tmp/bconcmds
END_OF_DATA
run_bconsole
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=$SLOT1 pool=Full drive=$DRIVE1
-label storage=DDS-4 volume=TestVolume002 slot=$SLOT2 pool=Default drive=$DRIVE1
+label storage=tape volume=TestVolume001 slot=$SLOT1 pool=Full drive=$DRIVE1
+label storage=tape volume=TestVolume002 slot=$SLOT2 pool=Default drive=$DRIVE1
list volumes
@# Start job with Client run before and sleep
run job=NightlySave1 level=Full pool=Default yes
#run job=NightlySave1 level=Full pool=Default yes
@# wait between starting jobs
@sleep 60
-setdebug level=190 storage=DDS-4
+setdebug level=190 storage=tape
run job=NightlySave2 level=Full pool=Full yes
run job=NightlySave2 level=Full pool=Full yes
#run job=NightlySave2 level=Full pool=Full yes
@sleep 10
-status storage=DDS-4
+status storage=tape
messages
wait
list volumes
@# now do a restore
@#
@$out tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out tmp/log1.out
-setdebug level=150 storage=DDS-4
-label storage=DDS-4 volume=TestVolume001 slot=1 pool=Full drive=0
-label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
+setdebug level=150 storage=tape
+label storage=tape volume=TestVolume001 slot=1 pool=Full drive=0
+label storage=tape volume=TestVolume002 slot=2 pool=Default drive=0
list volumes
@# Start job with Client run before and sleep
run job=NightlySave1 level=Full pool=Default yes
run job=NightlySave1 level=Full pool=Default yes
@# wait between starting jobs
@sleep 30
-@#setdebug level=100 storage=DDS-4
+@#setdebug level=100 storage=tape
run job=NightlySave2 level=Full pool=Full yes
run job=NightlySave2 level=Full pool=Full yes
@sleep 10
@sleep 10
messages
@sleep 10
-status storage=DDS-4
+status storage=tape
messages
wait
list volumes
@# now do a restore
@#
@$out tmp/log2.out
-release storage=DDS-4 drive=0
-release storage=DDS-4 drive=1
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+release storage=tape drive=0
+release storage=tape drive=1
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=$SLOT1 pool=Default drive=$DRIVE1
-label storage=DDS-4 volume=TestVolume002 slot=$SLOT2 pool=Default drive=$DRIVE1
+label storage=tape volume=TestVolume001 slot=$SLOT1 pool=Default drive=$DRIVE1
+label storage=tape volume=TestVolume002 slot=$SLOT2 pool=Default drive=$DRIVE1
update Volume=TestVolume002 MaxVolBytes=3000000 pool=Default drive=$DRIVE1
sql
select * from Storage;
select VolumeName,InChanger,Slot,StorageId from Media;
@#setdebug level=1000 client=$CLIENT
-setdebug level=150 storage=DDS-4
+setdebug level=150 storage=tape
run job=$JobName yes
wait
sql
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
$scripts/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} unload $SLOT2 ${TAPE_DRIVE} 0
@# now do a restore
@#
@$out tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=1 pool=Default drive=0
-label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
+label storage=tape volume=TestVolume001 slot=1 pool=Default drive=0
+label storage=tape volume=TestVolume002 slot=2 pool=Default drive=0
update Volume=TestVolume001 MaxVolBytes=3000000 pool=Default drive=0
sql
select * from Storage;
@#setdebug level=1000 client=$CLIENT
run job=$JobName yes
wait
-update slots scan storage=DDS-4
+update slots scan storage=tape
sql
select * from Storage;
select VolumeName,InChanger,StorageId from Media;
@# now do a restore
@#
@$out tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out tmp/log1.out
-label storage=DDS-4 Volume=TestVolume001 slot=0
+label storage=tape Volume=TestVolume001 slot=0
run job=NightlySave yes
wait
messages
@$out /dev/null
messages
@$out tmp/log1.out
-setdebug level=1 storage=DDS-4 sd
-label storage=DDS-4 volume=TestVolume001 pool=Default
+setdebug level=1 storage=tape sd
+label storage=tape volume=TestVolume001 pool=Default
run job=$JobName yes
wait
messages
run_bacula
sleep 2
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-setdebug level=100 storage=DDS-4
-label storage=DDS-4 volume=TestVolume001 slot=$SLOT1 pool=Default drive=$DRIVE1
-label storage=DDS-4 volume=TestVolume002 slot=$SLOT2 Pool=Default drive=$DRIVE1
+setdebug level=100 storage=tape
+label storage=tape volume=TestVolume001 slot=$SLOT1 pool=Default drive=$DRIVE1
+label storage=tape volume=TestVolume002 slot=$SLOT2 Pool=Default drive=$DRIVE1
update Volume=TestVolume001 VolUse=30
update Volume=TestVolume002 VolUse=30
-run job=$JobName level=Full Storage=DDS-4 yes
+run job=$JobName level=Full Storage=tape yes
@sleep 31
-run job=$JobName level=Full Storage=DDS-4 yes
+run job=$JobName level=Full Storage=tape yes
wait
messages
list volumes
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
+restore where=${cwd}/tmp/bacula-restores select storage=tape
unmark *
mark *
done
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default drive=0
+label storage=tape volume=TestVolume001 slot=0 pool=Default drive=0
run job=$JobName yes
@sleep 10
-status storage=DDS-4
+status storage=tape
@sleep 30
messages
wait
@# now do a restore
@#
@$out tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs
@$out /dev/null
messages
@$out tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default drive=0
+label storage=tape volume=TestVolume001 slot=0 pool=Default drive=0
run job=NightlySave yes
@sleep 10
-status storage=DDS-4
+status storage=tape
@sleep 30
messages
wait
@# now do a restore
@#
@$out tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores client=Tibs select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores client=Tibs select all storage=tape done
yes
wait
messages
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
stop_bacula
check_two_logs