Typos in source4/scripting/bin/samba_backup

Matthias Dieter Wallnöfer mdw at samba.org
Wed Jan 12 05:36:32 MST 2011


ekacnet,

hasthispatchalreadybeenapplied?

Cheers,
Matthias




________________________________

Hi

Sorry, I forgottocopythelist.

On 7 January 2011 23:59, MatthieuPatou <mat at samba.org> wrote:
> HiMicheal,
>>>
>>> I agreethatthe samba_backupscriptshouldnot back up all thedata
>>> on all oftheshares, but just stuffthat's necessaryfor Samba to
>>> functionproperly.
>>>
>>> Bytheway, therearesometypos in thescript.  A variable called
>>> relativedirnameissetatthetopoftheloop, andthenfurtherdown,
>>> refativedirnameandrelativedirnamearebothused a fewtimes.
>>>
>>> Thisprobablyworksbecauseyoucdto $FROMWHEREbeforetheloopand
>>> the "find $refativedirname -name ..." expandsto "find -name ..."
>>> whichistreatedthesameas "find . -name ..." by GNU find (butnot
>>> BSDfindandtheversionsfromproprietaryUNIXesasfaras I
>>> remember.)
>>>
>>> I haven't testedtoseewhathappensif I rename all instancesof
>>> refativedirnametorelativedirname.
>
> Thanksforyoureagle's eye !
>
> Canyoueitherfill a bugof (better) provideus a patch I'llsignitoff.

Here's thepatch.

Bytheway, I noticedanotherminorissue.  Ifyouhaverun an
upgradeprovisionandyou still havethebackup, thenrelativedirname
will containboththecurrentandtheoldpathsforsysvol:

# for d in private etc sysvol; do
> rel=`find . -type d -name "$d" -prune`
> echorel: $rel
> n=`echo $d | sed 's/\//_/g'`
> echo n: $n
> done
rel: ./private
n: private
rel: ./etc
n: etc
rel: ./private/backupprovisionQ9w8wA/sysvol ./sysvol
n: sysvol

Itseemsit will just back up a littlemorethannecessary, so it's
not a bigproblem.

-- 
Michael Wood <esiotrot at gmail.com>




More information about the samba-technical mailing list