Subject | Re: [Firebird-Java] Are there plans for streaming backup support? |
---|---|
Author | Ivan Arabadzhiev |
Post date | 2016-02-17T20:15:03Z |
Yep, got that - the .net implementation was actually quite easy to read :) I have pushed another rework of the restore flow which should finally fix normal restore for good.
Compiled version is available at https://drive.google.com/folderview?id=0BxNlh1_CctC4N1RsLWRLaUZTSHM&usp=sharing
The dummy is used as follows :
java -cp "jaybird-full-3.0.0-SNAPSHOT.jar:dummy1-0.1.0-SNAPSHOT-standalone.jar" dummy1.core <the available options>
There is a helpfile, but :
-p, --port PORT 3050 Firebird port
-u, --user USER SYSDBA Firebird user
-k, --key PASSWORD masterkey Firebird password
-f, --backupfile file-path test.fbk The .fbk file to use for backup/restore
-d, --database db-path test.fdb
-h, --host HOST 127.0.0.1 Hostname/IP of the Firebird host
-l, --log logfile-path File to use for the verbose output of a restore operation
-v, --verbose Verbose output of a restore operation (has no effect on backup). Will use stdout by default
-b, --backup We would like to backup a databasse
-r, --restore A restore function would take place
-o, --replace A restore with enabled overwrite
-g, --gzip Whether to use the built-in GZIP I/O streams in the JVM
-u, --user USER SYSDBA Firebird user
-k, --key PASSWORD masterkey Firebird password
-f, --backupfile file-path test.fbk The .fbk file to use for backup/restore
-d, --database db-path test.fdb
-h, --host HOST 127.0.0.1 Hostname/IP of the Firebird host
-l, --log logfile-path File to use for the verbose output of a restore operation
-v, --verbose Verbose output of a restore operation (has no effect on backup). Will use stdout by default
-b, --backup We would like to backup a databasse
-r, --restore A restore function would take place
-o, --replace A restore with enabled overwrite
-g, --gzip Whether to use the built-in GZIP I/O streams in the JVM
Obviously, one of -o/-r/-b needs to be specified, if your test setup happens to match the defaults - everything else can be skipped.
PS While testing the dummy I did notice that the way I'm currently expecting to hit EOF doesn't work with GZIPInputStream. I'm thinking I can wrap the input in a BufferedInputStream so the code can 'if(read() < 0) quit; else reset()' after each read but, Alf willing, I'll be asleep in 15 minutes so it won't be tonight :) In the mean time - the other stuff should be working and somewhat stable.
2016-02-17 21:42 GMT+02:00 Jiří Činčura jiri@... [Firebird-Java] <Firebird-Java@yahoogroups.com>:
> I can, and I have. In fact you are a big part of why I got to a working
> solution so fast :)
:)
For backup there's just isc_info_svc_to_eof. That's fine-ish.
Restore sucks. You need to keep asking for next buffer from server or
you finish the file and then eventually wait isc_info_svc_line returning
zero lines.
--
Mgr. Jiří Činčura
Independent IT Specialist