3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Run a simple backup of the Bacula build directory then create some
9 # new files, do an Incremental and restore those two files.
11 TestName="short-incremental-test"
16 ${rscripts}/copy-test-confs
17 echo "${tmpsrc}" >${tmp}/file-list
19 cp -p ${src}/src/dird/*.c ${tmpsrc}
21 echo "${tmpsrc}/ficheriro1.txt" >restore-list
22 echo "${tmpsrc}/ficheriro2.txt" >>restore-list
25 change_jobname CompressedTest $JobName
28 cat <<END_OF_DATA >${tmp}/bconcmds
32 setdebug level=200 storage=File
33 setdebug level=200 client
34 @#setdebug level=100 director
35 label storage=File volume=TestVolume001
36 label storage=File volume=TestVolume002
45 check_for_zombie_jobs storage=File
47 # Now create two new files to be restored later
50 echo "ficheriro1.txt" >${tmpsrc}/ficheriro1.txt
51 cp -f ${tmpsrc}/dird.c ${tmpsrc}/ficheriro2.txt
53 cat <<END_OF_DATA >${tmp}/bconcmds
57 @# Force Incremental on the second Volume
58 @#update volume=TestVolume001 VolStatus=Used
59 setdebug level=4 storage=File
60 setdebug level=4 client
61 run level=Differential job=$JobName yes
69 cat <<END_OF_DATA >${tmp}/bconcmds
73 setdebug level=4 storage=File
74 run level=Incremental job=$JobName yes
81 setdebug level=10 storage=File
82 restore where=${tmp}/bacula-restores storage=File file=<${tmp}/restore-list
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