3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Attempt to strip the path
15 scripts/copy-strip-confs
17 # Make a copy of build/src/dird to be backed up
18 rm -rf ${tmp}/$$-strip
19 mkdir -p ${tmp}/$$-strip
20 cp -rpf ${cwd}/build/src/dird/ ${tmp}/$$-strip/
21 echo "${tmp}/$$-strip" >${cwd}/tmp/file-list
23 # Now, strip the first 4 parts of the path (which is what
24 # the backup will do and put the result in rpath
25 echo "${tmp}/$$-strip/" >${tmp}/1
26 rpath=`cut -f5- -d'/' ${tmp}/1`
27 #echo "========= $rpath"
29 change_jobname NightlySave $JobName
32 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
38 @$out ${cwd}/tmp/log1.out
39 @#setdebug level=150 dir
40 @#setdebug level=150 storage=FileStorage
41 setdebug level=100 client=$CLIENT
42 label storage=FileStorage pool=Default volume=TestVolume001
43 run job=$JobName storage=FileStorage pool=Default yes
52 rm -rf ${cwd}/tmp/bacula-restores
54 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
60 @$out ${cwd}/tmp/log2.out
61 @#setdebug level=50 client=$CLIENT
62 restore where=${cwd}/tmp/bacula-restores select all storage=FileStorage done
71 check_for_zombie_jobs storage=FileStorage
76 if test "$debug" -eq 1 ; then
77 diff -ur ${tmp}/$$-strip/ ${tmp}/bacula-restores/${rpath}
79 diff -r ${tmp}/$$-strip/ ${tmp}/bacula-restores/${rpath} 2>&1 >/dev/null
83 rm -rf ${tmp}/$$-strip