Subject RE: [IBO] Closing the IB_Connection
Author Alan McDonald
> You can shut down all connections with e.g.
>
> gfix -sh -tr n my_db.fdb
>
> where n is the timeout in seconds.
>
> If there are still unfinished transactions after n seconds, the
> shutdown fails. You can then force it with
>
> gfix -sh -f n my_db.fdb
>
> After doing your thing, bring the database back online with
>
> gfix -o my_db.fdb
>
>
> By the way, the usual practice is to restore to a *new* file, not to
> overwrite the existing db. If the restore succeeds, try to rename the
> existing file to e.g. my_old_db.fdb. If the rename succeeds, nobody
> was connected. If not, shut down using gfix and retry the rename.
>
> Once the old db has been renamed, rename the restored db to the
> original name. Then reconnect.
>
>
> Greetings,
> Paul Vinkenoog

I think this is the wrong procedure, it ends up that you are possibly
collecting updates into original db while you are restoring and renaming
files.
I recommend:
1. try shut down - gentle then forced... as above
2. rename existing to something else (old) so absolutely no chance of anyone
connecting while you do your maintenance.
3. do your backup and restore to yet another new file name. If you restore
the original file name and someone connects before restore is complete, you
will get corruption.
4. rename this new successful restore to the original filename.
Now you have a successful restore back to it's original file name and it's
OK to continue.

Alan
4. rename the successful restore to the original file name.