Type = Restore
Client=@hostname@-fd
FileSet="Full Set"
- Storage = LTO
+ Storage = LTO1
Messages = Standard
Pool = Default
Where = @tmpdir@/bacula-restores
File Retention = 30d # 30 days
Job Retention = 180d # six months
AutoPrune = yes # Prune expired Jobs/Files
- Maximum Concurrent Jobs = 4
+ Maximum Concurrent Jobs = 10
}
# Client (File Services) to backup
File Retention = 30d # 30 days
Job Retention = 180d # six months
AutoPrune = yes # Prune expired Jobs/Files
- Maximum Concurrent Jobs = 4
+ Maximum Concurrent Jobs = 10
}
# Client (File Services) to backup
File Retention = 30d # 30 days
Job Retention = 180d # six months
AutoPrune = yes # Prune expired Jobs/Files
- Maximum Concurrent Jobs = 4
+ Maximum Concurrent Jobs = 10
}
# Client (File Services) to backup
File Retention = 30d # 30 days
Job Retention = 180d # six months
AutoPrune = yes # Prune expired Jobs/Files
- Maximum Concurrent Jobs = 4
+ Maximum Concurrent Jobs = 10
}
# Client (File Services) to backup
File Retention = 30d # 30 days
Job Retention = 180d # six months
AutoPrune = yes # Prune expired Jobs/Files
- Maximum Concurrent Jobs = 4
+ Maximum Concurrent Jobs = 10
}
Maximum Concurrent Jobs = 50
}
-# define all LTO drives
-Storage {
- Name = LTO
- Address = @hostname@
- SDPort = @sdport@
- Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
- Device = LTO
- Autochanger = yes
- Maximum Concurrent Jobs = 50
-}
-
-
################################################################
# WARNING: Bacula doesn't support this kind of configuration
# This is for testing purpose only !!!!!!!!!!!!
SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = LTO3_0
+ Media Type = LTO3
Autochanger = yes
Maximum Concurrent Jobs = 5
}
SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = LTO3_1
+ Media Type = LTO3
Autochanger = yes
Maximum Concurrent Jobs = 5
}
SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = LTO3_2
+ Media Type = LTO3
Autochanger = yes
Maximum Concurrent Jobs = 5
}
SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = LTO1_3
+ Media Type = LTO1
Autochanger = yes
Maximum Concurrent Jobs = 5
}
SDPort = @sdport@
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = LTO1_4
+ Media Type = LTO1
Autochanger = yes
Maximum Concurrent Jobs = 5
}
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = FileStorage # must be same as Device in Storage daemon
Media Type = FileMedia # must be same as MediaType in Storage daemon
- Maximum Concurrent Jobs = 4
+ Maximum Concurrent Jobs = 10
}
# Generic catalog service
Volume Retention = 365d # one year
}
+Pool {
+ Name = Diff
+ Pool Type = Backup
+ Recycle = yes # Bacula can automatically recycle Volumes
+ AutoPrune = yes # Prune expired volumes
+ Volume Retention = 365d # one year
+}
+
Pool {
Name = Scratch
Pool Type = Backup
AutoPrune = yes # Prune expired volumes
Volume Retention = 365d # one year
Recycle Pool = Scratch # recycle back here
+ Cleaning Prefix = CLN
}
. scripts/functions
# check if user wants to run this test
-if test x$USE_FAKETAPE == x; then
+if test x$USE_FAKETAPE = x; then
exit 1
fi
adir=@working_dir@/ach
-mkdir $adir
+mkdir $adir 2> /dev/null
+rm -f $adir/log $adir/barcodes $adir/slot* $adir/drive* 2> /dev/null
# create the autochanger configuration file
cat > $adir/conf <<EOF
maxdrive=8
-maxslot=10
+maxslot=80
dbgfile=$adir/log
EOF
# turn on ach debug
touch $adir/log
-# create 80 volumes
-for i in `seq 1 80`; do
+# create 75 volumes
+for i in `seq 1 75`; do
echo $i:vol$i >> $adir/barcodes
cp /dev/null $adir/slot$i
done
+# make a cleaning tape
+echo 76:CLN01 >> $adir/barcodes
+cp /dev/null $adir/slot76
+
+# keep other empty
+for i in `seq 77 79`; do
+ echo $i: >> $adir/barcodes
+done
+
--- /dev/null
+#!/bin/sh
+#
+# Run backups with dummy tape driver
+# This test setups an Autochanger with 80 slots
+# and 5 drives (3 LTO3 and 2 LTO1)
+#
+# TAPE_DRIVE="$cwd/working/fake/drive0"
+# TAPE_DRIVE1="$cwd/working/fake/drive0"
+# AUTOCHANGER="$cwd/working/fake/conf"
+# USE_FAKETAPE=--enable-faketape
+# AUTOCHANGER_SCRIPT=disk-changer
+#
+
+TestName="faketape-test-changer"
+JobName=backup
+. scripts/functions
+
+require_faketape
+
+scripts/cleanup
+scripts/copy-tape-confs
+cp scripts/bacula-dir-faketape.conf bin/bacula-dir.conf
+cp scripts/bacula-sd-faketape.conf bin/bacula-sd.conf
+scripts/prepare-big-autochanger
+
+echo "${cwd}/build" >${cwd}/tmp/file-list
+
+start_test
+
+when1=`perl -MPOSIX -e "print strftime('%F %T', localtime(time+30))"`
+clientname=`awk '/Name = .*-fd/ { if (!ok) { print $3 ; ok=1 } }' bin/bacula-dir.conf`
+
+# Catalog record for cleaning tape "CLN01" successfully created.
+# CLN01 | Cleaning
+
+# Write out bconsole commands
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@output /dev/null
+messages
+@$out ${cwd}/tmp/log1.out
+@#setdebug level=200 storage=LTO1
+label barcodes pool=Scratch slots=1-40 storage=LTO1 drive=3
+yes
+label barcodes pool=Scratch slots=41-80 storage=LTO3 drive=0
+yes
+messages
+list volumes
+messages
+@$out ${cwd}/tmp/log2.out
+run storage=LTO3 when="$when1" job=NightlySave pool=Inc yes
+run storage=LTO3 when="$when1" job=NightlySave2 pool=Full yes
+run storage=LTO3 when="$when1" job=NightlySave1 pool=Default yes
+run storage=LTO1 when="$when1" job=NightlySave pool=Inc yes
+run storage=LTO1 when="$when1" job=NightlySave2 pool=Full yes
+run storage=LTO1 when="$when1" job=NightlySave1 pool=Default yes
+wait
+messages
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=LTO1 client=$clientname
+check_for_zombie_jobs storage=LTO3 client=$clientname
+
+export dstat=1
+export bstat=1
+export rstat=1
+
+stop_bacula
+
+end_test
+