Can not commit index on restore

14 views
Skip to first unread message

Tomasz Dubiel

unread,
Jan 24, 2023, 2:24:00 PM1/24/23
to firebird-java
Hello.
I post here as well, because specifically I use Java, Jaybird to make backups and restores of the databases
As I can see, in FB 3.0 there are changes to the restoring DB with problems with indexes.
In FB 2.5 the process returned an error, we were catching this on daily restore of made backups. Now, in FB 3.0, the process returns no error - there is additional message with information, but there is no error of restoring the database.
How is it possible to still know the process didn't go 100% correctly and we have to correct something?
Is there a special method in Jaybird which gives us a message about this problem?
Best regards.

Tomasz Dubiel

unread,
Jan 25, 2023, 2:29:00 AM1/25/23
to firebird-java
I could be wrong and there could be no changes in that topic so I change the question: how do you recommend to check for such errors?

Tomasz Dubiel

unread,
Jan 25, 2023, 4:07:15 AM1/25/23
to firebird-java
Is there a possibility to somehow add the logger by setLogger method, so that there are only errors written to the log?

Tomasz Dubiel

unread,
Jan 25, 2023, 4:53:01 AM1/25/23
to firebird-java
I dealt with that simply by searching for the "error" in the created log. I dont know if there is a better solution.

Mark Rotteveel

unread,
Jan 25, 2023, 10:15:35 AM1/25/23
to firebi...@googlegroups.com
On 25-01-2023 10:53, Tomasz Dubiel wrote:
> I dealt with that simply by searching for the "error" in the created
> log. I dont know if there is a better solution.
>
> środa, 25 stycznia 2023 o 10:07:15 UTC+1 Tomasz Dubiel napisał(a):
>
> Is there a possibility to somehow add the logger by setLogger
> method, so that there are only errors written to the log?
>
> środa, 25 stycznia 2023 o 08:29:00 UTC+1 Tomasz Dubiel napisał(a):
>
> I could be wrong and there could be no changes in that topic so
> I change the question: how do you recommend to check for such
> errors?

There is no better way as far as I'm aware. Jaybird simply returns the
(verbose) output that the service manager provides and throws exception
for errors the service call produces.

If Firebird no longer ends the service backup in an error in this case,
based on your minimal description, I would think that is a bug in Firebird.

Mark
--
Mark Rotteveel

Tomasz Dubiel

unread,
Jan 25, 2023, 10:49:50 AM1/25/23
to firebird-java
As I said, Im not sure whether this was exactly the same in FB 2.5 or no.
The current situation is that gbak completes successfully, but with the message:
"gbak: cannot commit index ...
gbak ERROR violation of foreign key constaint
gbak ERROR: foreign key reference target does not exist
.....
gbak: Database is not online due to failure to activate one or more indices
gbak: Run gfix -online to bring database online without active indices"
This is the result of running FBBackupManager.restoreDatabase(); there is no exception and without manually searching for the logger messages, I have no idea something went wrong. Do you think this is a bug?

Mark Rotteveel

unread,
Jan 25, 2023, 10:59:07 AM1/25/23
to firebi...@googlegroups.com
On 25-01-2023 16:49, Tomasz Dubiel wrote:
> As I said, Im not sure whether this was exactly the same in FB 2.5 or no.
> The current situation is that gbak completes successfully, but with the
> message:
> "gbak: cannot commit index ...
> gbak ERROR violation of foreign key constaint
> gbak ERROR: foreign key reference target does not exist
> .....
> gbak: Database is not online due to failure to activate one or more indices
> gbak: Run gfix -online to bring database online without active indices"
> This is the result of running FBBackupManager.restoreDatabase(); there
> is no exception and without manually searching for the logger messages,
> I have no idea something went wrong. Do you think this is a bug?

I'm not sure. I suggest you ask on firebird-devel if the service API
actually provides a way to detect this (other than by scanning the
service response).

If you think with Firebird 2.5 Jaybird used to produce an actual
exception, I guess the mechanism should be there, and if that no longer
works, I think it is a bug in Firebird, but that is an assumption based
on you mentioning that you recall it worked differently with Firebird 2.5.

I rarely touch the management classes (and almost all of them predate me
joining Jaybird), so I'm not really that familiar with the ins-and-outs
of these APIs. I'll see if I can reproduce a similar problem and
experiment with this, but that might take a few days before I have time
to do so (and intentionally creating broken backups is not always so easy).

Mark
--
Mark Rotteveel

Tomasz Dubiel

unread,
Jan 25, 2023, 11:00:48 AM1/25/23
to firebird-java
Thanks. I will ask.

Tomasz Dubiel

unread,
Jan 30, 2023, 2:53:37 AM1/30/23
to firebi...@googlegroups.com
Well, it doesn't seem to be noisy there :-)

--
You received this message because you are subscribed to a topic in the Google Groups "firebird-java" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebird-java/YY5A-BySalU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebird-jav...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebird-java/6ad70ea9-8c12-4289-ba70-a211bda1c99fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages