Subject Re: [firebird-support] backup-mode ?
Author Helen Borrie
At 12:59 AM 23/11/2004 +0000, you wrote:


>Hi,
>how is it possible to set a db in a "backup-mode"?

There is no such thing as "backup-mode". GBAK -b[ackup] runs in a snapshot
transaction, alongside any other transactions that are going on.

>Sometimes when I try to restore a backup with gbak -R
>I get an error like "Database might be in use...".
>I´ve to restart the DB then gbak -R is successful.

gbak -R[eplace_database] has to delete the database file(s) in order to
work. Never use it! It should be taken to some fast-flowing river and
drowned with ceremony.

Use gbak -c[reate_database] when you want to restore a database. Use a
temporary filename for the new database and log on and test it before
"going live" with it.

To replace the existing database with the restored one, get everyone off
line and rename the database file. If you can't rename it, it means
someone is still connected.

If you plan to restore immediately after a gbak, then take everyone offline
*before* you run the backup and keep them off until after your gbak -c is
done and tested and you have the fresh database on line. If you don't, any
work done by users during the backup will be lost.

As SYSDBA or Owner, you can put the database into shutdown mode using
gfix. This will prevent anyone logging in. See the IB6 beta OpGuide.pdf
or Chapter 39 of The Firebird Book for details on shutting down a database.
The command is gfix -shut (with various switch options).

./heLen