Subject [IBO] Re: Connection string to FilePath?
Author russellbelding
Hi Alan

Thanks for your comments. They are helpful in teasing out issues I
could easily overlook or may have overlooked.

--- In, "Alan McDonald" <alan@m...> wrote:
> > My reason for asking this is in the context of making a feature
in my
> > application for sites to backup and restore their FB datafile in
> > simple a manner as possible.
> then do you customer a favour and install this service
> on their server when you install FB. Then visit them or train one
person or
> write up a clear procedure to do a once per annum restore.

Thanks for this reference, new to me.

> > I want a solution to be friendly to
> > users whose applications may be forced to close and to minimise
> > time they cannot reconnect to the datafile.
> >
> as I say - this is purely up to the processor speed and gbak you
> hasten it past these variables.

Agree processor speed and gbak are of prime importance to minimise
time offline. But there is more. The sequence of events in the file
system for a restore affect time offline and the orderly shutdown of
applications using the database may affect the tidiness of the
database, even with careful use of transaction management. Automatic
schedulers have no clear way to effect an orderly shutdown. Which
ones do? With VPN's, remote connections and telecommuting I assume
there is no day or time when one can assure there is no application
connected to the database. Only the database will know how many
cooperative users are connected to it.

> > So I thought a strategy to minimise the offline time would be to:
> > 1. make a backup file (FileBK) of the datafile FileBD.
> > 2. rename the datafile FileDB->FileOldDB_date
> as long as noone is updating while you backup - otherwise, rename
>before you backup

If a restore is required from an aged backup, users will have to
know that data was lost from the start-of-backup until the-end-of-
restore. Updating missed during backup may also be lost, just
like all the updating in between.

With a non-destructive or planned backup and restore the backup
starts only after all operators have orderly disconnected from the
database except the one requesting the backup and restore.

> > 3. rename the backup FileBK->FileDB
> > 4. do something with FileOldDB_data
> >
> > Perhaps the IBOAdmin code does this, I don't know. It seemed to me
> > this would reduce the time the Datafile was unavailable to my
> > application. During the backup apps could request a login but
> > be refused in a friendly manner as the datafile "knows" a backup
> > underway and a restore is coming. Only when a restore was planned
> > would connections be refused.
> the connections have to be refused as soon as (*before*) the backup

> >
> > To do the renaming I'd need access to the file in the FB DB
> <snip>
> Alan