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
16 echo "${cwd}/tmp/build" >/tmp/file-list
17 rm -rf ${cwd}/tmp/build
18 mkdir ${cwd}/tmp/build
19 # Copy only the .c files (to be restored)
20 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
24 sed s%\^%${cwd}/tmp/build/% 1 >restore-list
25 # At this point restore-list contains the list
26 # of files we will restore
29 # Now backup *everything*
30 rm -rf ${cwd}/tmp/build
31 mkdir ${cwd}/tmp/build
32 cp -fp ${cwd}/build/src/dird/* ${cwd}/tmp/build
33 # Enable MaximumFileSize
34 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
35 sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
37 change_jobname CompressedTest $JobName
40 cat <<END_OF_DATA >tmp/bconcmds
44 label storage=File volume=TestVolume001
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