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
14 ./drop_bacula_tables >/dev/null 2>&1
15 ./make_bacula_tables >/dev/null 2>&1
16 ./grant_bacula_privileges 2>&1 >/dev/null
21 echo " === Starting recycle-test ==="
22 echo " === Starting recycle-test ===" >working/log
25 bin/bacula start 2>&1 >/dev/null
26 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
29 label storage=File1 volume=TestVolume001
30 label storage=File1 volume=TestVolume002
31 label storage=File1 volume=TestVolume003
32 update Volume=TestVolume001 volretention=10s
33 update Volume=TestVolume001 maxvoljobs=1
34 update Volume=TestVolume002 volretention=10s
35 update Volume=TestVolume002 maxvoljobs=1
36 update Volume=TestVolume003 volretention=10s
37 update Volume=TestVolume003 maxvoljobs=1
39 run job=NightlySave storage=File1 level=full yes
43 run job=NightlySave storage=File1 level=full yes
47 run job=NightlySave storage=File1 level=full yes
52 run job=NightlySave storage=File1 level=full yes
56 run job=NightlySave storage=File1 level=full yes
61 run job=NightlySave storage=File1 level=full yes
69 restore where=${cwd}/tmp/bacula-restores select storage=File1
79 scripts/check_for_zombie_jobs storage=File1
80 bin/bacula stop 2>&1 >/dev/null
81 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
83 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
85 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
86 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
89 echo " !!!!! recycle-test Bacula source failed!!! !!!!! "
90 echo " !!!!! recycle-test failed!!! !!!!! " >>test.out
93 echo " ===== recycle-test Bacula source OK ===== "
94 echo " ===== recycle-test OK ===== " >>test.out