]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/recycle-test
Update disk tests
[bacula/bacula] / regress / tests / recycle-test
1 #!/bin/sh
2 #
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.
7 #
8 TestName="recycle-test"
9 JobName=Recycle
10 . scripts/functions
11 set_debug 0
12
13 cwd=`pwd`
14 scripts/copy-test-confs
15 scripts/cleanup
16 echo "${cwd}/build" >/tmp/file-list
17
18 change_jobname NightlySave $JobName
19 start_test
20
21 cat <<END_OF_DATA >tmp/bconcmds
22 @output /dev/null
23 messages
24 @$out tmp/log1.out
25 label storage=File1 volume=TestVolume001
26 label storage=File1 volume=TestVolume002
27 label storage=File1 volume=TestVolume003
28 update Volume=TestVolume001 volretention=10s
29 update Volume=TestVolume001 maxvoljobs=1
30 update Volume=TestVolume002 volretention=10s
31 update Volume=TestVolume002 maxvoljobs=1
32 update Volume=TestVolume003 volretention=10s
33 update Volume=TestVolume003 maxvoljobs=1
34 list volumes
35 run job=$JobName storage=File1 level=full yes
36 wait
37 messages
38 list volumes
39 run job=$JobName storage=File1 level=full yes
40 wait
41 messages
42 list volumes
43 run job=$JobName storage=File1 level=full yes
44 wait
45 messages
46 list volumes
47 @sleep 10
48 run job=$JobName storage=File1 level=full yes
49 wait
50 messages
51 list volumes
52 run job=$JobName storage=File1 level=full yes
53 wait
54 messages
55 list volumes
56 run job=$JobName storage=File1 level=full yes
57 wait
58 messages
59 list volumes
60 @# 
61 @# now do a restore
62 @#
63 @$out tmp/log2.out
64 restore where=${cwd}/tmp/bacula-restores select storage=File1
65 unmark *
66 mark *
67 done
68 yes
69 wait
70 messages
71 @output
72 quit
73 END_OF_DATA
74
75 run_bacula
76 check_for_zombie_jobs storage=File1
77 stop_bacula
78
79 check_two_logs
80 check_restore_diff
81 end_test