Subject | Re: [firebird-support] FB 2.5 shutdown & restore question |
---|---|
Author | Dmitry Kuzmenko |
Post date | 2013-04-03T21:11:20Z |
Hello, Rick!
Wednesday, April 3, 2013, 11:09:33 PM, you wrote:
RD> gfix -shut single -force 1 server:/opt/firebird/db/clone.fdb
RD> rm -fv /opt/firebird/db/clone.fdb
RD> gbak -v -use_all_space -r /mnt/usb/firebird/clone.fbk
RD> server:/opt/firebird/db/clone.fdb
RD> gfix -online normal server:/opt/firebird/db/clone.fdb
RD> Target shutdown mode is invalid for database
RD> "/opt/firebird/db/clone.fdb"
point 1 - shutdown state is not stored into backup.
During restore DB is itself in single-user mode, so, noone can connect
until restore finishes. If there was error, gbak will not turn
db into online state (to indicate error).
Also, Sean suggested correct scenario, because, when you delete
DB on Linux, and there is at least 1 connected user (with single-mode
shutdown), and create new DB with the same name (by restore),
there will be 2 different (!!!) db files - old one and new one.
I don't remember what problems this may lead to, but suggest to avoid
such situations.
--
Dmitry Kuzmenko, www.ib-aid.com
Wednesday, April 3, 2013, 11:09:33 PM, you wrote:
RD> gfix -shut single -force 1 server:/opt/firebird/db/clone.fdb
RD> rm -fv /opt/firebird/db/clone.fdb
RD> gbak -v -use_all_space -r /mnt/usb/firebird/clone.fbk
RD> server:/opt/firebird/db/clone.fdb
RD> gfix -online normal server:/opt/firebird/db/clone.fdb
RD> Target shutdown mode is invalid for database
RD> "/opt/firebird/db/clone.fdb"
point 1 - shutdown state is not stored into backup.
During restore DB is itself in single-user mode, so, noone can connect
until restore finishes. If there was error, gbak will not turn
db into online state (to indicate error).
Also, Sean suggested correct scenario, because, when you delete
DB on Linux, and there is at least 1 connected user (with single-mode
shutdown), and create new DB with the same name (by restore),
there will be 2 different (!!!) db files - old one and new one.
I don't remember what problems this may lead to, but suggest to avoid
such situations.
--
Dmitry Kuzmenko, www.ib-aid.com