[Samba] Samba 4 DC backups

Mark Foley mfoley at ohprs.org
Wed Sep 2 02:56:02 UTC 2015


You are right.  In fact I initially removed the backup of the .ldb from my
script because the manpage says nothing about .ldb's, so I thought I must have
been mistaken including them.  I put the .ldb backup back in after seeing the
samba_backup script. 

I do have a comment in my backup script saying if samba is not stopped, then
--exclude \*.ldb from the tar. Which, as you point out, I am currently not

For me, even a full backup takes only an hour and runs after midnight, so in the
case of a restore (which I've done!) it's worth saving a step not having to
verify/restore .ldb and .tdb files before starting samba.  Especially since in
the heat of a restore (usually associated with some urgency) I sometimes tend to
forget such details. 

Also, I found the whole attr/acl thing much more of an issue since this wasn't
well documented anywhere.

I probably should have been more verbose in my reply. Sometimes, less is not more!

--Mark Foley

-----Original Message-----
> Date: Wed, 02 Sep 2015 09:43:29 +1200
> From: "Brady, Mike" <mike.brady at devnull.net.nz>
> To: samba at lists.samba.org
> Subject: Re: [Samba] Samba 4 DC backups
> Mark,
> As I understand it the samba_backup script is using tdbbackup to create 
> a backup of each ldb file and then creates a tar of everything except 
> the running ldb files but including the ldb.bak files and the running 
> tdb  files (which is a no no).
>  From what I understood from your previous email you are creating a 
> tdbbackup of the tdb files and creating a tar of the running ldb files, 
> except that you are actually shutting down the DC, so running tdbbackup 
> in your case really isn't necessary.
> tdbbackup is really only necessary if you are trying to backup a running 
> DC.
> But then maybe I am completely missing something.
> Regards
> Mike
> On 2015-09-02 08:22, Mark Foley wrote:
> > Mike,
> > 
> > I thought I pretty much did the same thing as the backup script: backup 
> > ldb, do
> > tar.  Also, I am stopping Samba for good measure, but I don't think I 
> > need to.
> > What makes you say I'm doing the "exact opposite" of what the samba 
> > script does?
> > Please explain, I want to be consistent with good practice.
> > 
> > --Mark
> > 
> > -----Original Message-----
> >> Date: Tue, 01 Sep 2015 19:19:31 +1200
> >> From: "Brady, Mike" <mike.brady at devnull.net.nz>
> >> To: samba at lists.samba.org
> >> Subject: Re: [Samba] Samba 4 DC backups
> >> 
> >> Mark
> >> 
> >> Ok so you doing the exact opposite of what the samba_backup script 
> >> does
> >> with regards to ldb and tdb files, but then you are shutting down 
> >> Samba
> >> to do a backup anyway so it doesn't really matter what you are doing 
> >> in
> >> this regard.
> >> 
> >> I want a consistent backup while Samba is running.
> >> 
> >> Regards
> >> 
> >> Mike
> >> 
> -- 

More information about the samba mailing list