Subject Re: [firebird-support] Problem with corrupt backups
Author Bradley Tate
Alan McDonald wrote:

> > Hi all,
> >
> > For the second time the backup of our 3G Firebird 1.0.3 database has
> > been corrupted. We do a backup and restore nightly for QA and for use
> > in other systems. All tables in the restored database then appear empty
> > i.e. result sets from selects are empty and the roles have disappeared.
> > We suspected a permission problem but even when we add permissions back
> > using grant all we still cannot get access to any data from any table
> > even logging in as sysdba. There are no errors reported from the backup
> > or restore process, and gfix reports nothing wrong with either the
> > restored database or the original.
> >
> > To try and track down the problem we did the restore in Firebird 1.5 RC8
> > and it tells us that one of our tables has a duplicate on the primary
> > key. The problem is if we go back to our original database and do a
> > select it performs as expected and there is no evidence of this. Given
> > that we know what the problem is we can fix it (copy table, drop
> > original, copy back) but does anybody have any idea what could be
> > causing it so we can stop it happening again? We're suspicious that the
> > backup is getting too much data i.e. records which should not exist any
> > more.
> >
> > The original database is running on Linux (RedHat 7.3)
> >
> > Thanks.
> >
>
> Are you restoring to the same OS(linux)?

Yes

> Is the DB spilt across multiple files? If so how many?

No, not split.

> Is 3Gb over the limit for your OS?

No. We're running the 64bit FB version

> When was the last time you successfully restored? And how large was the DB
> at this time?

We successfully restored the day before the corruption. The restored
copy is also used in production systems, so problems tend to be noticed.
The restored DB seemed about the right size. If I look at the file with
a binary viewer there is certainly data in there.

> Have you searched this newsgroup for similar problems adn resolutions?
> I've
> seen this sort of prob before on this group and someone (maybe Helen)
> walked
> someone thru to the problem.

I've searched the newsgroup. There are other (seemingly different)
corruption problems on the list and there is the last message I sent a
little while ago about this problem which you and Helen (and others)
responded to ("Empty tables after restore").

I'm wondering how I can get a duplicate primary key in the backup (per
the FB1.5 error message) but there is no indication of it in the
original database and the 1.0.3 restore process doesn't notice it at
all. This has me quite worried as our company lives and dies by our
database.

Cheers