Subject Re[2]: [Firebird-Java] Users Connected
Author Евгений Путилин
Hi
>
> > You can restore and backup DB with worked user. Fierbird not
> > lock DB file. I recommend restore DB in temporary file, and
> > It rename to final DB name after good restore.
>
> No. No. No. No. Never !!!
> You really want to restore a database to a temporary file and the rename it,
> replacing the "old" version?
> BAD IDEA.
no is good idea, restore db over existing is more bad. I have some situation when I restore work DB.

> Even if firebird does not lock the db (which I never tried on linux - it
> does so on windows) it definitely keeps it open. So if you replace the file
> (or better: the filename), the file handle will still use the old file
> (which is not linked in the filesystem anymore)!
Yes. I have this situation on Linux. After delete file, some users may work with file by its handle.
> Therefor every change will be lost (every change since backup and because of
> the file handle even every change afterwards)!
Lost some date is more good then lost full db file.
> Shut down the database completely (there is a command for this I don't
> remember right now). Backup, restore, and bring the database online again...
> No other way.
gfix -shut
> But on the other hand? Why would you want to backup and restore? Backup is a
> good idea, so is restoring for test of validity of the backup, but restore
> it somewhere else, not replacing your old db...
Ok. I undestend you, I thinked you backup and restore on one work file.
:-)

WBR Eugeney Putilin.