]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/backup-to-null
Add some debug info
[bacula/bacula] / regress / tests / backup-to-null
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory 
4 #   to a tape then restore it, we do that twice to ensure that
5 #   we can correctly append to a tape.
6 # We also use the purge and the relabel commands as
7 #   well as a pile of status storage commands.
8 #
9 TestName="backup-to-null"
10 JobName=backuptonull
11 . scripts/functions
12 set_debug 0
13
14 cwd=`pwd`
15 scripts/cleanup
16 scripts/copy-fifo-confs
17
18 echo "${cwd}/build" >/tmp/file-list
19
20 change_jobname NightlySave $JobName
21 rm -f tmp/log1.out tmp/log2.out
22 start_test
23
24
25 # Write out bconsole commands
26 cat <<END_OF_DATA >tmp/bconcmds
27 @output /dev/null
28 messages
29 @$out tmp/log1.out
30 @#setdebug level=200 storage=Dummy
31 label storage=Dummy volume=TestVolume001 slot=0 pool=Default
32 run job=$JobName yes
33 status storage=Dummy
34 @sleep 1
35 wait
36 @sleep 3
37 messages
38 quit
39 END_OF_DATA
40
41 run_bacula
42 check_for_zombie_jobs storage=Dummy
43 stop_bacula
44
45 #
46 # Now do a second backup after making a few changes
47 #
48 touch ${cwd}/build/src/dird/*.c
49 echo "test test" > ${cwd}/build/src/dird/xxx
50
51 cat <<END_OF_DATA >tmp/bconcmds
52 @$out /dev/null
53 messages
54 @$out tmp/log2.out
55 list volumes
56 run job=$JobName yes
57 wait
58 list volumes
59 @sleep 3
60 messages
61 quit
62 END_OF_DATA
63
64 run_bacula
65 check_for_zombie_jobs storage=Dummy
66 stop_bacula
67
68 grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
69 bstat=$?
70 grep "^  Termination: *Backup OK" tmp/log2.out 2>&1 >/dev/null
71 dstat=$?
72
73 # not yet implemented
74 rstat=0
75
76 end_test