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="short-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 @#setdebug level=100 storage=File
28 @#setdebug level=200 client
29 @#setdebug level=100 director
30 label storage=File volume=TestVolume001
31 label storage=File volume=TestVolume002
40 check_for_zombie_jobs storage=File
42 # Now create two new files to be restored later
45 echo "ficheriro1.txt" >${tmpsrc}/ficheriro1.txt
46 cp -f ${tmpsrc}/dird.c ${tmpsrc}/ficheriro2.txt
48 cat <<END_OF_DATA >${tmp}/bconcmds
52 @# Force Incremental on the second Volume
53 update volume=TestVolume001 VolStatus=Used
54 run level=Differential job=$JobName yes
62 cat <<END_OF_DATA >${tmp}/bconcmds
66 setdebug level=200 storage=File
67 run level=Incremental job=$JobName yes
74 setdebug level=10 storage=File
75 restore where=${tmp}/bacula-restores storage=File file=<${tmp}/restore-list
85 check_for_zombie_jobs storage=File
90 # Delete .c files because we will only restored the txt files
93 check_restore_tmp_build_diff