3 # Run a backup of the full bacula build directory, but with the
4 # Maximum File Size set. Then do a restore of a few files to kick in
5 # disk seeking (not yet enabled), and ensure that the restored files
6 # match. Even though disk seeking is not yet enabled, this is a good test,
7 # and once it is enabled, this will test it.
9 TestName="restore-disk-seek-test"
10 JobName=restore-disk-seek
15 scripts/copy-test-confs
17 echo "${cwd}/tmp/build" >/tmp/file-list
18 rm -rf ${cwd}/tmp/build
19 mkdir ${cwd}/tmp/build
20 # Copy only the .c files (to be restored)
21 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
25 sed s%\^%${cwd}/tmp/build/% 1 >restore-list
26 # At this point restore-list contains the list
27 # of files we will restore
30 # Now backup *everything*
31 rm -rf ${cwd}/tmp/build
32 mkdir ${cwd}/tmp/build
33 cp -fp ${cwd}/build/src/dird/* ${cwd}/tmp/build
34 # Enable MaximumFileSize
35 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
36 sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
40 cat <<END_OF_DATA >tmp/bconcmds
44 label storage=File volume=TestVolume001
45 run job=CompressedTest yes
53 select * from JobMedia;
55 restore bootstrap=${cwd}/tmp/kern.bsr where=${cwd}/tmp/bacula-restores storage=File
57 <${cwd}/tmp/restore-list
67 check_for_zombie_jobs storage=File
70 # Now setup a control directory of only what we *should* restore
71 rm -rf ${cwd}/tmp/build
72 mkdir ${cwd}/tmp/build
73 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
76 check_restore_tmp_build_diff