]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/backup-to-null
Add execute bit to systemstate test
[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
13 scripts/cleanup
14 scripts/copy-fifo-confs
15
16 echo "${cwd}/build" >${cwd}/tmp/file-list
17
18 change_jobname NightlySave $JobName
19 rm -f ${cwd}/tmp/log1.out ${cwd}/tmp/log2.out
20 start_test
21
22
23 # Write out bconsole commands
24 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
25 @$out /dev/null
26 messages
27 @$out ${cwd}/tmp/log1.out
28 @#setdebug level=200 storage=Dummy
29 label storage=Dummy volume=TestVolume001 slot=0 pool=Default
30 run job=$JobName yes
31 status storage=Dummy
32 @sleep 1
33 wait
34 @sleep 3
35 messages
36 quit
37 END_OF_DATA
38
39 run_bacula
40 check_for_zombie_jobs storage=Dummy
41 stop_bacula
42
43 #
44 # Now do a second backup after making a few changes
45 #
46 touch ${cwd}/build/src/dird/*.c
47 echo "test test" > ${cwd}/build/src/dird/xxx
48
49 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
50 @$out /dev/null
51 messages
52 @$out ${cwd}/tmp/log2.out
53 list volumes
54 run job=$JobName yes
55 wait
56 list volumes
57 @sleep 3
58 messages
59 quit
60 END_OF_DATA
61
62 run_bacula
63 check_for_zombie_jobs storage=Dummy
64 stop_bacula
65
66 grep "^  Termination: *Backup OK" ${cwd}/tmp/log1.out 2>&1 >/dev/null
67 bstat=$?
68 grep "^  Termination: *Backup OK" ${cwd}/tmp/log2.out 2>&1 >/dev/null
69 dstat=$?
70
71 # not yet implemented
72 rstat=0
73
74 end_test