Backing up samba4

Rowland Penny repenny at f2s.com
Wed Sep 19 08:31:52 MDT 2012


On 19/09/12 14:55, Marc Muehlfeld wrote:
> Am 19.09.2012 15:27, schrieb steve:
>> I just did it on a test LAN. I deleted /usr/local/samba and rsynced 
>> it back.
>> samba fired up fine. xp and w7 clients could log in and GPO's were 
>> respected.
>>
>> What is the problem in doing this? It works with openSUSE 12.2. It 
>> fails with
>> ubuntu lts.
>
> I guess it worked, because during the rsync, nothing was changed in 
> the tdb/ldb files, because it's a small test network. If you have a 
> bigger network, where the databases often changes, it could happen 
> that this appears during your rsync. Then you have a 
> corrupt/inconsistent "backup".
>
> I think for the tdb/ldb files tdbdump is a must.
>
> In my backup script I run tdbbackup for all that files to generate the 
> *.bak of them and then tar the whole to a save place (with ext. ACLs). 
> So I can copy it back and have a hopefully save backup of the 
> databases if neccessary.
>
>
>
>
> On Rowlands initial question, how to to restore tdbbackup files:
> https://lists.samba.org/archive/samba/2012-June/167878.html
>
> I haven't tried it yet. But let me know if tdbrestore is the working way.
>
>
> Regards,
> Marc
>
>
>
>
Hi, the one thing about samba 4 you can be sure of, is that you will get 
confused easily ;-)

on one hand:

On 19/09/12 12:17, Ricky Nance wrote:
 >
 > Yes simply removing the .bak will be sufficient, you can also use 
tdbrestore.
 >

on the other hand:

Marc posts a link to a previous post that says:

Use tdbrestore to restore tdb files.
tdbback dbname.tdb > dbname-backup
tdbrestore dbname.tdb < dbname-backup

Is what Ricky Nance wrote correct, can you just remove the .bak? or 
would it be better to use tdbrestore and if so, are the given commands 
correct?

Thanks

Utterly Confused Rowland ;-)




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the samba-technical mailing list