Subject Re: [firebird-support] Firebird 2.0 embedded backups
Author Helen Borrie
At 08:16 AM 5/04/2007, you wrote:
>I am trying to use gbak or nbackup(preferred) to do a backup of a
>firebird 2.0 database which is embedded.
>gbak -b myDB.fdb myDB.fbk //fails "unavailable server"
>gbak -b myDB.fdb myDB.fbk -user sysdba -pass masterkey //fails
>"unavailable server"

As with any embedded setup, the application and the embedded library
have to be in the same folder. I suspect you have gbak in the /bin
directory or somewhere else altogether, since the error message tells
you that gbak isn't finding a running server (which it won't, if it
can't find fbembed.dll, renamed as fbclient.dll).

Tip: keep a dedicated application folder for running any of
Firebird's command-line tools.

And don't try to run anything under the embedded server if something
else already has a connection to the database in question.

If you want to do hot backups from your application, write a routine
using the Services API.

>The same is true of nbackup.

I don't *think* you can use nBackup with the embedded model, at least
not while anything else is active. nBackup isn't supported in the
Services API, either.

>On my development machine, I have a classic/superserver (for
>convenience). If I use the control panel applet to start the server,
>the second command shown above will succeed. If I stop the server, it
>fails again.

Of course. Both gbak and nBackup are client applications. They
don't work if there is not a running server.

>The intended deployment of this will be an embedded server. I do not
>want to install a real server on the target computers.

Then do some work: implement backup capability in your own
application code and provide a user-friendly interface. That way
your users won't bump into the situation of attempting to run a
command-line backup and being unable to do so because they are
working in the app.