3 # Run a simple backup of the Bacula build directory but
4 # create three volumes and do six backups causing the
5 # volumes to be recycled, and cycling through the volumes
6 # twice. Tests maxvoljobs and volretention.
9 scripts/copy-test-confs
11 echo "${cwd}/build" >/tmp/file-list
12 bin/bacula stop 2>&1 >/dev/null
13 bin/drop_sqlite_tables
14 bin/make_sqlite_tables
18 echo " === Starting recycle-test ==="
19 echo " === Starting recycle-test ===" >working/log
22 bin/bacula start 2>&1 >/dev/null
23 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
26 label storage=File1 volume=TestVolume001
27 label storage=File1 volume=TestVolume002
28 label storage=File1 volume=TestVolume003
29 update Volume=TestVolume001 volretention=10s
30 update Volume=TestVolume001 maxvoljobs=1
31 update Volume=TestVolume002 volretention=10s
32 update Volume=TestVolume002 maxvoljobs=1
33 update Volume=TestVolume003 volretention=10s
34 update Volume=TestVolume003 maxvoljobs=1
36 run job=NightlySave storage=File1 level=full yes
40 run job=NightlySave storage=File1 level=full yes
44 run job=NightlySave storage=File1 level=full yes
49 run job=NightlySave storage=File1 level=full yes
53 run job=NightlySave storage=File1 level=full yes
58 run job=NightlySave storage=File1 level=full yes
66 restore where=${cwd}/tmp/bacula-restores select all
73 bin/bacula stop 2>&1 >/dev/null
74 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
76 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
78 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
79 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
82 echo " !!!!! recycle-test Bacula source failed!!! !!!!! "
83 echo " !!!!! recycle-test failed!!! !!!!! " >>test.out
86 echo " ===== recycle-test Bacula source OK ===== "
87 echo " ===== recycle-test OK ===== " >>test.out