3 # Run a simple backup of the Bacula build directory using the compressed option
7 TestName="restore-replace-never"
8 JobName=restore-replace-never
12 scripts/copy-test-confs
13 mkdir -p ${cwd}/tmp/dir/dir1
14 touch ${cwd}/tmp/dir/dir1/file1
15 touch ${cwd}/tmp/dir/dir1/file2
16 echo ${cwd}/tmp/dir >${cwd}/tmp/file-list
18 stat ${cwd}/tmp/dir >${cwd}/tmp/1
19 stat ${cwd}/tmp/dir/dir1 >>${cwd}/tmp/1
20 stat ${cwd}/tmp/dir/dir1/file1 >>${cwd}/tmp/1
21 stat ${cwd}/tmp/dir/dir1/file2 >>${cwd}/tmp/1
23 grep -v "Change:" ${cwd}/tmp/1 >${cwd}/tmp/stat-before
25 change_jobname CompressedTest $JobName
28 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
31 @$out ${cwd}/tmp/log1.out
32 label storage=File volume=TestVolume001
43 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
46 @$out ${cwd}/tmp/log2.out
47 restore where=/ storage=File replace=never select all done yes
48 @#restore where=/ storage=File select all done yes
56 stat ${cwd}/tmp/dir >${cwd}/tmp/1
57 stat ${cwd}/tmp/dir/dir1 >>${cwd}/tmp/1
58 stat ${cwd}/tmp/dir/dir1/file1 >>${cwd}/tmp/1
59 stat ${cwd}/tmp/dir/dir1/file2 >>${cwd}/tmp/1
61 grep -v "Change:" ${cwd}/tmp/1 >${cwd}/tmp/stat-after
63 check_for_zombie_jobs storage=File
67 if test "$debug" -eq 1 ; then
68 diff -u ${cwd}/tmp/stat-before ${cwd}/tmp/stat-after
70 diff -u ${cwd}/tmp/stat-before ${cwd}/tmp/stat-after 2>&1 >/dev/null