[Samba] Samba4 Backup and Recovery Tutorial

lp101 lingpanda101 at gmail.com
Tue Jul 22 13:43:25 MDT 2014


     Looking to implement the backup script from the Wiki. I hit a snag 
at this part.

*Because this script is very basic at the moment, there are some things 
to know, if you plan to use it unchanged: *


  * *The script doesn't backup extended ACLs. This results in that
    you'll lose the permissions e. g. on the SysVol share. If you have a
    tar version that supports the --xattrs option (see the tar manpage),
    you should add this option to all 'tar' commands inside the script.
    This enables tar to keep extended ACLs in the archives *

I installed Samba from a tar ball(4.1.7) and changed my fstab to support 
xattrs so I believe this is applicable to me?  If so can someone provide 
me with an example of this option from within the script? Is below 
correct and all that's needed? I have not altered my samba default 
installation directory. Thanks.

  tar *--xattrs* cjf ${WHERE}/samba4_${n}.${WHEN}.tar.bz2 
$relativedirname --exclude=*.ldb >/dev/null 2>&1
                 if [ $? -ne 0 ]; then
                         echo "Error while archiving 
                         exit 1
                 find $relativedirname -name "*.ldb.bak" -exec rm {} \;
                 tar *--xattrs* cjf ${WHERE}/${n}.${WHEN}.tar.bz2  
$relativedirname >/dev/null 2>&1
                 if [ $? -ne 0 ]; then


More information about the samba mailing list