3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
6 # Run a simple backup of the Bacula build directory
7 # to /dev/null Of course, it's not possible to restore ;-)
9 TestName="backup-to-null"
15 # Not compatible with a backup to /dev/null
21 scripts/copy-fifo-confs
23 echo "${cwd}/build" >${cwd}/tmp/file-list
25 change_jobname NightlySave $JobName
26 rm -f ${cwd}/tmp/log1.out ${cwd}/tmp/log2.out
30 # Write out bconsole commands
31 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
34 @$out ${cwd}/tmp/log1.out
35 @#setdebug level=200 storage=Dummy
36 label storage=Dummy volume=TestVolume001 slot=0 pool=Default
47 check_for_zombie_jobs storage=Dummy
51 # Now do a second backup after making a few changes
53 touch ${cwd}/build/src/dird/*.c
54 echo "test test" > ${cwd}/build/src/dird/xxx
56 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
59 @$out ${cwd}/tmp/log2.out
70 check_for_zombie_jobs storage=Dummy
73 grep "^ Termination: *Backup OK" ${cwd}/tmp/log1.out 2>&1 >/dev/null
75 grep "^ Termination: *Backup OK" ${cwd}/tmp/log2.out 2>&1 >/dev/null