Subject replace a database in production


i have a web app that use firebird embedded database hosted in the internet.

and the same database in local used by a regular database 2.5 server

I have to replace the web database with the local one (a kind of replication)

the problem is that the database could be used at that moment so locked at that time,therefore impossible to replace the fdb file.

so any idea and suggestions on how this could be done is welcome