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=500 dir
33 setdebug level=200 storage=File
34 setdebug level=200 client
35 @#setdebug level=100 director
36 label storage=File volume=TestVolume001
37 label storage=File volume=TestVolume002
38 label storage=File volume=TestVolume003
39 label storage=File volume=TestVolume004
49 check_for_zombie_jobs storage=File
51 # Now create two new files to be restored later
54 echo "ficheriro1.txt" >${tmpsrc}/ficheriro1.txt
55 cp -f ${tmpsrc}/dird.c ${tmpsrc}/ficheriro2.txt
56 # set Volumes as read-only
57 chmod -w $tmp/TestVolume001
58 chmod -w $tmp/TestVolume002
60 cat <<END_OF_DATA >${tmp}/bconcmds
64 @# Force Incremental on the second Volume
65 @#update volume=TestVolume001 VolStatus=Used
66 setdebug level=4 storage=File
67 setdebug level=4 client
68 run level=Differential job=$JobName yes
76 cat <<END_OF_DATA >${tmp}/bconcmds
80 setdebug level=4 storage=File
81 run level=Incremental job=$JobName yes
90 setdebug level=10 storage=File
91 restore where=${tmp}/bacula-restores storage=File file=<${tmp}/restore-list
102 check_for_zombie_jobs storage=File
107 # Delete .c files because we will only restored the txt files
110 check_restore_tmp_build_diff