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 # set files to "*.c" for all c files
21 files="ua_tree.c ua_update.c"
24 cp -p ${cwd}/build/src/dird/${i} ${cwd}/tmp/build
29 sed s%\^%${cwd}/tmp/build/% 1 >restore-list
31 # At this point restore-list contains the list
32 # of files we will restore
37 # Now arrange to backup *everything*
39 rm -rf ${cwd}/tmp/build
40 mkdir ${cwd}/tmp/build
41 cp -fp ${cwd}/build/src/dird/* ${cwd}/tmp/build
43 # Enable MaximumFileSize to ensure lots of JobMedia records and thus
46 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
47 sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
49 change_jobname CompressedTest $JobName
52 cat <<END_OF_DATA >tmp/bconcmds
56 label storage=File volume=TestVolume001
65 setdebug level=10 storage=File
67 @# print the JobMedia records
68 select * from JobMedia;
70 restore bootstrap=${cwd}/tmp/kern.bsr where=${cwd}/tmp/bacula-restores storage=File
72 <${cwd}/tmp/restore-list
82 check_for_zombie_jobs storage=File
85 # Now setup a control directory of only what we *should* restore
86 rm -rf ${cwd}/tmp/build
87 mkdir ${cwd}/tmp/build
89 cp -p ${cwd}/build/src/dird/${i} ${cwd}/tmp/build
93 check_restore_tmp_build_diff