[Samba] samba_backup script

Rowland Penny rowlandpenny at googlemail.com
Mon Aug 18 13:08:21 MDT 2014


Am 18.08.2014 20:14, schrieb Rowland Penny:
>> Ah, that explains it, I now use the Debian packages from backports and
>> the files you posted seem to be in /usr/lib/x86_64-linux-gnu/samba. I
>> just rewrote the script to backup /var/lib/samba/private & sysvol and
>> /etc/samba using the latest 'tar' that backs up ACL's.


 >In production I have use my own script, too. The one shipped with the
 >sources is to static (e. g. it doesn't work if one of the folders is 
 >not in /usr/local/samba/, and other things).


 >Maybe some day I will have a look at the original one and write a
 >replacement. :-)

 >The problem is, that not all versions of tar support --xattrs. Do you 
 >know
 >- if there's a way to find out in a script if tar has --xattrs support?

GNU tar version >= 1.27 has the required support, so I suppose if:
tar --version | grep 'GNU tar'
returns anything you can use '--xattrs' otherwise use the old command

 >- if tar fails if --xattrs support is missing or simply don't contains
 >the attributes in the archive?

Do not know, never tried ;-)

What is missing from the supplied script is a test to see if the samba 
daemon is running, which I think shouldn't be whilst you backup the 
directories.

Rowland



Regards
Marc


More information about the samba mailing list