Subject Re: [Firebird-Java] Restore using Service API not working (non localhost only)
Author Gabriel Reid
On Fri, Oct 20, 2006 at 07:13:29PM -0000, Ashok122 wrote:
> I am using (Firebird 1.5.3)
> final ServiceRequestBuffer serviceRequestBuffer =
> gds.createServiceRequestBuffer(ISCConstants.isc_action_svc_restore);
> and
> gds.iscServiceAttach("ServerName:service_mgr", handle, svcParamBuffer);
> I get following error...
> gbak: ERROR: cannot open backup file localhost:c:\backups\FIRSTTEST.fbk
> gbak: Exiting before completion due to errors
> It seems like it is ignoring "ServerName:service_mgr" in
> gds.iscServiceAttach() call.

This gbak output with the "localhost:" is generated from the perspective
of the machine running the services operation, so I don't think it's
correct to assume that it's ignoring the "ServerName:service_mgr"

> if I change to
> gds.iscServiceAttach("localhost:service_mgr", handle, svcParamBuffer);
> or
> if I change to
> gds.iscServiceAttach("service_mgr", handle, svcParamBuffer);
> Restore works.
> That proves that my code is working, but restore on the Firebird
> server is not happening. I am running the code where Firebird is not
> installed but JDBC driver is. And trying to start service on the
> Firebird server and do the Restore.
> The same code for the BAckup operation works just fine.

Indeed, this shows that the code is working when run on the local
machine, but something is going wrong when you try to execute the
operation on a remote machine. My first guess would be to check that the
backup file is available (and readable by the user under which Firebird
is running) on the remote server.

- Gabriel