Subject | Re[2]: [Firebird-Java] Users Connected |
---|---|
Author | Евгений Путилин |
Post date | 2005-05-31T11:49:32Z |
Hi
:-)
WBR Eugeney Putilin.
>no is good idea, restore db over existing is more bad. I have some situation when I restore work DB.
> > 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.
> Even if firebird does not lock the db (which I never tried on linux - itYes. I have this situation on Linux. After delete file, some users may work with file by its handle.
> 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)!
> Therefor every change will be lost (every change since backup and because ofLost some date is more good then lost full db file.
> the file handle even every change afterwards)!
> Shut down the database completely (there is a command for this I don'tgfix -shut
> remember right now). Backup, restore, and bring the database online again...
> No other way.
> But on the other hand? Why would you want to backup and restore? Backup is aOk. I undestend you, I thinked you backup and restore on one work file.
> good idea, so is restoring for test of validity of the backup, but restore
> it somewhere else, not replacing your old db...
:-)
WBR Eugeney Putilin.