Subject Re: [IBO] Restoring the Firebird Security DB
Author Helen Borrie
At 03:13 PM 22/09/2004 +0000, you wrote:
>Hope you guy don't mind the OT - I haven't got any response in the
>firebird-support group and I have a deadline (2 days ago).

I replied to your question in firebird-support the same day you posted it.


>I wrote a procedure using the IBOAdmin components in delphi to back up
>and restore both my program database as well as the security db. I
>want to keep users if the system is reinstalled.
>
>Now the backup is no problem, but I cant restore the security db
>becuase firebird 1.5+ is constantly connected to it. I've searched the
>web and have not found an answer to this, is there a simple way to
>suspend the connection of firebird to its security db so I can restore
>my copy? This needs to be automated so manually disabling firebird is
>not an option.
>
>I think many of you must have come across this issue, so if anyone
>could help it would be greatly appreciated.

Security.fdb was made to stay online constantly, in a read-only
transaction, precisely to prevent you (or an infiltrator) from using gbak
-r to overwrite it.

It's a chicken-and-egg problem. You shouldn't restore the security db
unless it gets corrupted but, if it gets corrupted, you can't run gbak.

So, what you do is back it up and then restore it, with a dated filename,
to a private, protected directory, test it, copy it to a CD and store the
CD securely off-line. Then it will be available to be file-copied into
place if the current one gets corrupted. Remember to unset the read-only
file attribute if copying back from a CD.

Helen