[Samba] how to backup samba ad domain
Rowland penny
rpenny at samba.org
Wed Jul 27 07:26:16 UTC 2016
On 26/07/16 22:59, Jules Houantonon wrote:
> My friend,
> you ow me a lot then. :D
>
> I receive an error on the line
>
> 179 ${CMD_AWK} -F '.' '{print $2}') if [ -n "${TARVERSION}" ] && [ "
> ${TARVERSION}" -ge "27" ]; then
>
> It is about Incorrect syntaxt. A syntax where not expected before the then.
>
> I am using Centos 7.2 and samba-sernet 4.2
>
> Thank you again
>
>
>
>
Hmm, something wrong here, line 179 should be:
# Test if GNU tar is installed and is the required version or newer
Followed by:
TARVERSION=$(${CMD_TAR} --version | ${CMD_GREP} 'GNU tar' | ${CMD_AWK}
'{print $NF}' | \
${CMD_AWK} -F '.' '{print $2}')
if [ -n "${TARVERSION}" ] && [ "${TARVERSION}" -ge "27" ]; then
TARARGS="--acls --xattrs -cjf"
else
TARARGS="-cjf"
fi
And I know this works (on debian) because I wrote it!
It is supposed to check that the version of 'tar' installed is 'GNU tar'
and the minor version is '27' or greater, if so, backup acls & xattrs.
Rowland
More information about the samba
mailing list