3 # Attempt to strip the path
10 scripts/copy-strip-confs
13 # Make a copy of build/src/dird to be backed up
14 rm -rf ${tmp}/$$-strip
16 cp -rpf ${cwd}/build/src/dird/ ${tmp}/$$-strip/
17 echo "${tmp}/$$-strip" >${cwd}/tmp/file-list
19 # Now, strip the first 4 parts of the path (which is what
20 # the backup will do and put the result in rpath
21 echo "${tmp}/$$-strip/" >${tmp}/1
22 rpath=`cut -f5- -d'/' ${tmp}/1`
23 echo "========= $rpath"
25 change_jobname NightlySave $JobName
28 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
31 @$out ${cwd}/tmp/log1.out
32 @#setdebug level=150 dir
33 @#setdebug level=150 storage=FileStorage
34 setdebug level=100 client=$CLIENT
35 label storage=FileStorage pool=Default volume=TestVolume001
36 run job=$JobName storage=FileStorage pool=Default yes
45 rm -rf ${cwd}/tmp/bacula-restores
47 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
53 @$out ${cwd}/tmp/log2.out
54 @#setdebug level=50 client=$CLIENT
55 restore where=${cwd}/tmp/bacula-restores select all storage=FileStorage done
65 check_for_zombie_jobs storage=FileStorage
70 if test "$debug" -eq 1 ; then
71 diff -ur ${tmp}/$$-strip/ ${tmp}/bacula-restores/${rpath}
73 diff -r ${tmp}/$$-strip/ ${tmp}/bacula-restores/${rpath} 2>&1 >/dev/null
77 rm -rf ${tmp}/$$-strip