How can i assure bkp and restore process preventing users trying to access?

T.y.

Use another name for the restored DB and rename the file after that.
If you use alias - comment it when you do the restore.
But I think that the Firebird won't give access to a database that is in process of restoration. I'm not 100% sure but the database file is in shutdown state when you do restore. And when the restore is complete Firebird brings the database online again if there are no errors.

Use another name for the restored DB and rename the file after that.
If you use alias - comment it when you do the restore.
But I think that the Firebird won't give access to a database that is in process of restoration. I'm not 100% sure but the database file is in shutdown state when you do restore. And when the restore is complete Firebird brings the database online again if there are no errors.

Yes, you right, on restore firebirg stays in shutdown mode, but it doenst happen in backup mode. when backup is running users can access flawlessly the database... I just wondering if there is any kind command to avoid it or stop access to start backup process...

Use gfix to shutdown the database manually before the backup.
And bring it online after restore.

Ty Dude, we getting close, but look this article.

Exclusive Access When a database is in a shutdown state, SYSDBA or the owner can log in and have exclusive access. However, watch out for these “gotchas”:

•If either the owner or SYSDBA was already logged in when the shutdown took effect, the server will not block the other from logging in once the shutdown is ineffect.

•Once either SYSDBA or the owner logs in after the shutdown, the other will be blocked from logging in. That’s good. If the same user wants to log in again, it will be permitted. That’s not so good. This puts the onus on the SYSDBA or owner user who needs exclusive access to ensure that either itself or the other is not logged in somewhere, using a visual admin tool, an SQL monitor, another command-line tool, or even another gfix option, for example. Once you get exclusive access, keep it exclusive—don’t start up more than one application.

After reading this article from

The Firebird Book:
A Reference for Database Developers HELEN BORRIE

reading the second blackball I got a doubt...how to ensure users to NOT try to connect...after all, users uses the same sysdba / masterkey password to connect on database...