Subject Re: [firebird-support] Restoring a Backup with a NULL cntraint and NULL data
Author unordained
---------- Original Message -----------
From: "Ann W. Harrison" <aharrison@...>
> The -n switch may disable not null constraints. Worth a try. Failing
> that look at IBSurgeon for backups.
> Ann
------- End of Original Message -------

-n will not only disable not-null constraints, it will restore a database without
the constraints at all -- none of them, not just the ones causing trouble. Before
you do this, you'll want to ensure you can get valid metadata from somewhere, so
you can compare and restore the constraints later. I've been burned by this, it
took me a while to fix manually. I had been keeping metadata-only exports around,
but none were recent enough at the time. And you'd probably want a tool like EMS
Metadata Comparer for Interbase/Firebird so you can restore such a metadata-only
database, restore a no-constraint version, then fix the data, then compare the
two and restore the missing constraints.

Could a switch be added to gbak to restore only metadata (-no_data)? That would
help, in a case such as this, where they may not have a separate usable backup
for their constraint metadata.

-Philip