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
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
24 bin/console -c bin/console.conf <<END_OF_DATA
27 label storage=File1 volume=TestVolume001
28 label storage=File1 volume=TestVolume002
29 label storage=File1 volume=TestVolume003
30 update Volume=TestVolume001 volretention=10s
31 update Volume=TestVolume001 maxvoljobs=1
32 update Volume=TestVolume002 volretention=10s
33 update Volume=TestVolume002 maxvoljobs=1
34 update Volume=TestVolume003 volretention=10s
35 update Volume=TestVolume003 maxvoljobs=1
37 run job=NightlySave storage=File1 level=full yes
41 run job=NightlySave storage=File1 level=full yes
45 run job=NightlySave storage=File1 level=full yes
50 run job=NightlySave storage=File1 level=full yes
54 run job=NightlySave storage=File1 level=full yes
59 run job=NightlySave storage=File1 level=full yes
67 restore where=${cwd}/tmp/bacula-restores current all
74 bin/bacula stop 2>&1 >/dev/null
75 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
77 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
79 diff -r build tmp/bacula-restores${cwd}/build
80 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
83 echo " !!!!! recycle-test Bacula source failed!!! !!!!! "
84 echo " !!!!! recycle-test failed!!! !!!!! " >>test.out
87 echo " ===== recycle-test Bacula source OK ===== "
88 echo " ===== recycle-test OK ===== " >>test.out