Subject Re: [firebird-support] FW: gbak can restore from DOS but not from CygWin
Author Helen Borrie
At 07:23 AM 4/03/2006, you wrote:
> > WI-V6.3.3.4870 Firebird 1.5
> >
> > From CygWin (http://cygwin.com) I can not restore a backup:
> >
> > jcalfee@RXS-CALFEE /cygdrive/c/Firebird
> > $ gbak -c reports.bak reports.fdb -user sysdba -pass masterkey
> > gbak: ERROR: unavailable database
> > gbak: ERROR: failed to create database reports.fdb
> > gbak: Exiting before completion due to errors
> >
> > However, from DOS this works fine:
> >
> > C:\Firebird>gbak -c reports.bak reports.fdb -user sysdba -pass masterkey
> >
> > Is this a bug?

No. It would be totally astonishing if it *did*
work, for reasons too numerous to mention.

Cygwin is not Linux, but it's not Windows,
either. Connecting to databases (which is what
gbak, as a client application, does) must be
through the absolute path to the database file.

That aside, a local connection on (native)
Windows is, like Cygwin itself, a "parallel
universe" - an emulated network transport. Local
connection on (native) Linux directly connects to
the database file using a (native Linux) client library called libfbembed.so.

And you could not expect a gbak executable that
was compiled on native Windows to work in a Linux
emulation layer, or one that was compiled on native Linux to work in Windows.

It would be an interesting experiment, though, to
see what happens if you attempt the restore using
a network access and service manager.

From the link you provided:

>> What Isn't Cygwin?

Cygwin is not a way to run native linux apps on
Windows. You have to rebuild your application
from source if you want it to run on Windows.
Cygwin is not a way to magically make native
Windows apps aware of UNIX ® functionality, like
signals, ptys, etc. Again, you need to build your
apps from source if you want to take advantage of Cygwin functionality. <<

fwiw, I've seen a few messages (none recent) in
firebird-devel from people who have been trying
to build Firebird in Cygwin. You might like to
post a question there, asking whether anyone is still trying.

./heLen