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

Steve Langasek vorlon at debian.org
Mon Aug 24 00:33:35 UTC 2009


On Sun, Aug 23, 2009 at 11:02:31PM +0200, Erik Rossen wrote:
> I just spent an hour modifying and testing the pre-existing
> /etc/cron.daily/samba to backup the /var/lib/samba/*.tdb files to
> /var/backups/samba on a number of Samba servers that I manage.

> If /etc/samba/smbpasswd is important enough to backup

It isn't.  By default, /etc/samba/smbpasswd is pointless to back up.

> then so is secrets.tdb, winbind_idmap.tdb, and all of the others.

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.

/etc/cron.daily/samba provides handling for /etc/samba/smbpasswd (in the
case it's present) equivalent to /etc/cron.daily/standard's handling of
/etc/passwd, /etc/group, and /etc/shadow: all of which are variable data
stored in /etc out of necessity, and therefore falling outside of any backup
policy for /var.  That argument does not apply to the files that are already
in /var, so I see no argument whatsoever for backing /var/lib/samba up
directly in the package.

> 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.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org





More information about the Pkg-samba-maint mailing list