]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/two-jobs-test
Final changes
[bacula/bacula] / regress / tests / two-jobs-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory using the compressed option
4 #   then backup a second time and finally restore it
5 #
6 TestName="two-jobs-test"
7 JobName=Two-Jobs
8 . scripts/functions
9 set_debug 0
10
11 cwd=`pwd`
12 scripts/cleanup
13 scripts/copy-test-confs
14 echo "${cwd}/build" >/tmp/file-list
15
16 change_jobname CompressedTest $JobName
17 start_test
18
19 cat >tmp/bconcmds <<END_OF_DATA
20 setdebug level=15  storage=File
21 @output /dev/null
22 messages
23 @output/dev/null
24 estimate job=$JobName listing
25 estimate job=$JobName listing
26 estimate job=$JobName listing
27 messages
28 @$out tmp/log1.out
29 label storage=File volume=TestVolume001
30 run job=$JobName yes
31 wait
32 messages
33 quit
34 END_OF_DATA
35
36 run_bacula
37 check_for_zombie_jobs storage=File 
38
39 echo "Backup 1 done"
40 touch ${cwd}/build/src/dird/*.c
41 #
42 # run a second job
43 #
44 cat >tmp/bconcmds <<END_OF_DATA
45 @output /dev/null
46 messages
47 @$out tmp/log1.out
48 run job=$JobName
49 yes
50 wait
51 messages
52 @# 
53 @# now do several restores to ensure we cleanup between jobs
54 @#
55 @output /dev/null
56 restore where=${cwd}/tmp/bacula-restores select all storage=File done
57 yes
58 wait
59 restore where=${cwd}/tmp/bacula-restores select all storage=File done
60 yes
61 wait
62 @$out tmp/log2.out
63 restore where=${cwd}/tmp/bacula-restores select storage=File
64 unmark *
65 mark *
66 done
67 yes
68 wait
69 messages
70 @output
71 quit
72 END_OF_DATA
73
74 run_bconsole
75 check_for_zombie_jobs storage=File
76 stop_bacula
77
78 check_two_logs
79 check_restore_diff
80 end_test