3 # Run a simple backup of the Bacula build directory then create some
4 # new files, do an Incremental and restore those two files.
6 TestName="incremental-test"
11 ${rscripts}/copy-test-confs
12 echo "${tmpsrc}" >${tmp}/file-list
14 cp -p ${src}/src/dird/*.c ${tmpsrc}
16 echo "${tmpsrc}/ficheriro1.txt" >restore-list
17 echo "${tmpsrc}/ficheriro2.txt" >>restore-list
20 change_jobname CompressedTest $JobName
23 cat <<END_OF_DATA >${tmp}/bconcmds
27 run comment="This is a comment for $JobName" job=$JobName yes
31 label storage=File volume=TestVolume001
37 SELECT Comment FROM Job WHERE JobId=1;
43 check_for_zombie_jobs storage=File
45 # Now create two new files to be restored later
48 echo "ficheriro1.txt" >${tmpsrc}/ficheriro1.txt
49 cp -f ${tmpsrc}/dird.c ${tmpsrc}/ficheriro2.txt
51 cat <<END_OF_DATA >${tmp}/bconcmds
55 @# Force Incremental on the second Volume
56 update volume=TestVolume001 VolStatus=Used
57 run comment="This is the incremental job" level=Differential job=$JobName yes
60 label storage=File volume=TestVolume002
66 SELECT Comment FROM Job WHERE JobId=2;
73 cat <<END_OF_DATA >${tmp}/bconcmds
80 restore comment="Ticket #1220 requested by toto@bacula.org" where=${tmp}/bacula-restores storage=File file=<${tmp}/restore-list
87 SELECT Comment FROM Job WHERE JobId=3;
93 check_for_zombie_jobs storage=File
98 # Delete .c files because we will only restored the txt files
101 check_restore_tmp_build_diff
103 grep "This is a comment for $JobName" $tmp/log3.out >/dev/null
105 print_debug "ERR: Can't find comment"
108 grep "Ticket #1220 requested by toto@bacula.org" $tmp/log3.out >/dev/null
110 print_debug "ERR: Can't find comment"
113 grep "This is the incremental job" $tmp/log3.out >/dev/null
115 print_debug "ERR: Can't find comment"