[Pkg-samba-maint] Bug#473651: [samba] Add a regular backup of .tdb files

Erik Rossen rossen at rossen.ch
Mon Aug 24 07:21:16 UTC 2009


On Sun, Aug 23, 2009 at 05:33:35PM -0700, Steve Langasek wrote:
> I agree that these are equally as important as *passdb.tdb* to back up.  But
> "copy to /var/backups" is not an appropriate backup strategy - these files
> are already under /var/lib and should therefore already be part of any
> system backup policy.  We should not be backing them up piecemeal in the
> samba package.

Ah, OK.  I was under the impression that /var/backups was meant for "critical
odds-and-ends that should be backed up by default even on systems managed by
extremely lax sysadmins".  A bit of googling for "debian policy /var/backups"
shows similar confusion by others.

> > One other point: many well-meaning sysadmins may be doing rsync backups of
> > their entire systems, including /var/lib/samba, thinking that they are safe in
> > case of any catastrophe.  But they might not be aware that the modification
> > date on the *.tdb files rarely gets changed, even if the contents do, because
> > Samba uses mmap() to access them.
> 
> Er, use of mmap() should not affect the filesystem semantics of mtime.  I
> think you're mistaken here.

You are right, mmap() *should* update mtime according to "man mmap".  But I do
not believe it ever since I got bitten by a bug like
http://his.luky.org/ML/linux-kernel.2005/msg28040.html or
http://his.luky.org/ML/linux-kernel.2005/msg28040.html a number of years ago.
I have been cautious of how I backup mmapped data ever since.

FYI, I just did a test with smbpasswd on my Lenny system with the
2.6.26-2-vserver-686 kernel and the /var/lib/samba/passdb.tdb file changed
mtime as it should.  Good.

-- 
Erik Rossen                               OpenPGP key: 2935D0B9
rossen at rossen.ch                          On fonce la tête dans
http://www.rtfm-sarl.ch                   le guidon et on RTFM.





More information about the Pkg-samba-maint mailing list