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