[Samba] safe to replace just one ldb file?
rowlandpenny at googlemail.com
Tue Sep 2 08:59:36 MDT 2014
On 02/09/14 15:47, mourik jan heupink - merit wrote:
> Hi Rowland,
>> OK, now that it is confirmed that you haven't done anything to damage
>> your AD ;-)
> Always good to be safe :-)
>> There is one problem that I can see, 'tdbbackup' is for backing up .tdb
>> files not .ldb files, the name sort of gives it away ;-)
> But... reading from https://wiki.samba.org/index.php/Backup_and_Recovery
> it tells me that:
> --- Whilst you must never copy a running database, you can backup
> *.ldb & *.tdb files online with 'tdbbackup'
> --- Backups of *.ldb files can be just renamed (remove the *.bak) to
> their old name to restore.
> I am under the impression that tdbbackup is used to backup both .ldb
> and .tdb files...? And when looking that samba_backup script, it seems
> to use tdbbackup as well:
> for ldb in `find $relativedirname -name "*.ldb"`; do
> tdbbackup $ldb
> if [ $? -ne 0 ]; then
> echo "Error while backuping $ldb"
> exit 1
> It feels a bit strange to question your knowledge... but...
Don't feel strange, I do not know everything :-) I just based what I
said on this from 'man tdbbackup' :
'tdbbackup is a tool that may be used to backup samba .tdb files.'
If this is incorrect (and I am not saying it is or isn't) then, in my
opinion, the manpage needs altering and the command name needs altering
> Are you sure that tdbbackup is only for tdb files?
well not now you that you have posted that excerpt from the backup
> Then: how to backup (or 'dump') ldb files?
OK, any devs want to comment on this ?
>> I think that you will need to backup everything, see:
>> Only possible problem is, if sernet-samba is like the debian samba4
>> packages, the backup script is not installed, if so just down the latest
>> samba4 tarball, unpack it and extract the script from there.
More information about the samba