Subject | Re: [Firebird-Java] Exceptions on FBBackupManager |
---|---|
Author | Roman Rokytskyy |
Post date | 2009-01-16T22:37:03Z |
> Thanks for the reply Roman. I'll do some parsing then. Unless there isYou could fork a gbak process from Java and check the error code when it
> a better way to do a restore in Java?
is finished. However, I don't like this approach because of two issues:
1. You can hardly report anything else except "Error while doing
restore.", since, AFAIK, the error codes are not that informative (and I
suspect that there is only one error code, but check the docs).
2. gbak, if not used with -services switch, transfers data over the
network. The wire protocol of Firebird is quite chatty and it is usually
more efficient to use Services API, which does nothing else as starting
gbak (not as a separate process, but the same code is used) on the
remote host. This would create a file on remote file system, and it is
faster to copy the file from the network using the normal file level
copy routines.
So, I would recommend to do the parsing... Also it would be great if you
could contribute the code back to the driver.
Thanks!
Roman