samba_backup error and restoring old backup files

Andrew Bartlett abartlet at samba.org
Wed Feb 19 03:21:53 MST 2014


On Wed, 2014-02-19 at 13:34 +0330, elyad alaei wrote:
> > On Sun, Feb 16, 2014 at 10:47 PM, Andrew Bartlett <abartlet at samba.org
> >wrote:
> 
> > >
> > > > On Sun, 2014-02-16 at 12:15 +0330, elyad alaei wrote:
> > > So is it safe to take backup online? as much as I remember, it often
> > failed
> > > to create "sysvol" and "etc" when I didn't stop samba before running
> > > samba_backup!
> >
> > If it failed to create these files, it is because it failed.  Check the
> > output of the script, you now see errors - these are almost certainly
> > why it 'missed' these directories, it existed early, but you never
> > noticed the error code.
> >
> > > Isn't there any way to check their (the  "samba4_private" file's)
> > > integrity?
> >
> > dbcheck might help, but if tdbbackup fails, then it implies some pretty
> > serious low level corruption, or some other serious error that needs to
> > be investigated.
> >
> 
> You mean, backup files can be corrupt even if dbcheck succeeds?!

If the backup script did not succeed without errors, then the backup is
not complete (therefore either corrupt or incomplete)

tdbbackup and dbcheck read the files at different layers, they can 'see'
different things. 

> >
> > > We have not changed any GP settings since then, so it would not be the
> > > issue, but our users may have been changed their passwords so we would
> > like
> > > to use the latest backups, if possible.
> > >
> > >
> > > > At this point to assist further I need to understand what the state is
> > > > of your main database.  Do you still have it?  Does it pass a
> > > > 'samba-tool dbcheck --cross-ncs'?  Does running the backup script
> > > > manually work?
> > > >
> > >
> > > Our domain still is under production and the output of 'samba-tool
> > dbcheck
> > > --cross-ncs' is:
> > > Checking 5156 objects
> > > Checked 5156 objects (0 errors)
> > >
> >
> > Those errors are a genuine concern.  We need to better understand why
> > they occur.
> >
> >
> Can I do anything to help (like giving more details)?!
> I think, in this situation, the best solution is to restore the backups of
> 31 DEC, where all 3 files were created ( "samba4_private", "sysvol",
> "etc")?! Can it cause any login problem for users (I don't mean for those
> who have changed their passwords)?!

Restoring an old version is a very drastic step.  We need to understand
more about why the tdbbackup fails, so understand if the reason is due
to reading the database, or writing the backup.  

To try and eliminate tool issues, does running tdbdump on each ldb file
succeed?  (these 'text' dump files can be restored back into a tdb)

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba




More information about the samba-technical mailing list