"a script for backuping production provision" [Was: Samba 4.0.0 alpha 14 "randomdata"]
Matthieu Patou
mat at matws.net
Tue Jan 4 10:05:35 MST 2011
On 04/01/2011 19:36, Adam Tauno Williams wrote:
> On Tue, 2011-01-04 at 19:16 +0300, Matthieu Patou wrote:
>> On 04/01/2011 18:34, Adam Tauno Williams wrote:
>>> On Fri, 2010-12-24 at 01:44 +0100, Jelmer Vernooij wrote:
>>>> a script for backuping production provision
>>> I assume this is source4/scripting/bin/samba_backup ? [since the script
>>> isn't named]
>>> Used like -
>>> source4 $ scripting/bin/samba_backup /opt/ad/samba4 /tmp
>> Yeah something like that although I'm not sure that /tmp is the best way
>> to save your provision ...
> I'm just testing [and documenting; so I know how to do this before I
> have to do-it-for-real]
>
>> Is it working ?
> It seems to [essentially just create backup of the {SAMBA-ROOT}/private
> directory]. The result is a file like "samba4_private.040111.tar.bz2"
> which I presume I can just uncompress in the {SAMBA-ROOT} in order to
> restore.
>
> Looking at the scrip the "tar cjf ${WHERE}/samba4_..." is a bit
> disconcerting as this won't necessarily backup file permissions [ACLs].
> A bit of getfacl/setfacl magic would be a nice touch.
Right, but hey it's better than nothing ;-), it would be better to use
something else that store the ACLs.
But in anycase storing posix ACLs won't help as we use extended
attributes to store NT ACLs and they are not (re)stored with (g|s)etfacl.
> Backup permissions to a file:
> getfacl -R {DIR}> {FILE}
>
> Restore permissions from a file:
> setacl --restore={FILE}
>
Matthieu.
More information about the samba-technical
mailing list