Subject | How to rename the database after backup/restore? |
---|---|
Author | Chuck Belanger |
Post date | 2012-02-04T05:02:04Z |
Hello:
After using Firebird (2.5 SS) exclusively in a desktop application
environment, I've created an associated app that stores data at an
internet address.
I just finished the code to allow me via a remote site to backup and
immediately restore as a maintenance operation the database.
My plan was to back up to a temp file, then restore that to another temp
file, Disconnect, Shutdown the database with GFIX then FTP.rename the
original database to a filename with time stamp string and then
FTP.rename the temp file to the original database name.
My mistake is that GFIX shutdown would allow this to happen.
How do you allow a rename of the database in an FTP operation? Or is
there a better way of doing what I am trying to do? I am hesitant to do
a restore directly over the original database, but maybe someone can
advise me on that?
Thank you,
Chuck Belanger
After using Firebird (2.5 SS) exclusively in a desktop application
environment, I've created an associated app that stores data at an
internet address.
I just finished the code to allow me via a remote site to backup and
immediately restore as a maintenance operation the database.
My plan was to back up to a temp file, then restore that to another temp
file, Disconnect, Shutdown the database with GFIX then FTP.rename the
original database to a filename with time stamp string and then
FTP.rename the temp file to the original database name.
My mistake is that GFIX shutdown would allow this to happen.
How do you allow a rename of the database in an FTP operation? Or is
there a better way of doing what I am trying to do? I am hesitant to do
a restore directly over the original database, but maybe someone can
advise me on that?
Thank you,
Chuck Belanger