Subject Re: [Firebird-Java] Are there plans for streaming backup support?
Author Ivan Arabadzhiev
Hi,
First - thank you for the response, it's always better to now where things are at the moment.
Yes, I have used .setLogger(), to be more precise :

(with-open [r (clojure.java.io/output-stream "/tmp/sample.fbk")]
               (doto (org.firebirdsql.management.FBBackupManager.)
                 (.setHost "127.0.0.1")
                 (.setPort 3050)
                 (.setUser "SYSDBA")
                 (.setPassword "masterkey")
                 (.setLogger r)
                 (.setDatabase "/srv/firebird/rpk.fdb")
                 (.setBackupPath "stdout")
                 (.backupDatabase)))

(currently I'm doing most JVM development on clojure but the code is simple enough to understand as is)
Obviously, haven't put it in production so I can't really say how reliable it is but I have tested it on windows/linux 32/64 bit so it might turn out to be a viable code path (possibly with a better interface to specify the output stream).
I have been meaning to port a .net backup tool I no longer want/can support over to the JVM and would prefer it to work without any external fb dependencies but it has been about an year so far so I'm not making promises on the PR :) If I do get to it - the agreement won't be a problem.

2016-01-16 11:27 GMT+02:00 Mark Rotteveel mark@... [Firebird-Java] <Firebird-Java@yahoogroups.com>:
 

On 15-1-2016 11:28, Ivan Arabadzhiev intelrullz@...
[Firebird-Java] wrote:
> I did some looking around and did not see it mentioned so I figured I
> should ask - is streaming backup support planned for some point in time
> (or is it implemented already and I can't see it?) ?

As far as I am aware it is not implemented yet. See issue
http://tracker.firebirdsql.org/browse/JDBC-256

> I have actually tested it with setting an output stream on a standard
> backup with the expected parameters - it appears to be working (so far
> all .fbk files are restorable) but I could use a second opinion on
> whether such a backup may be problematic for some reason.

I am not really sure what you mean with this, did you use the setLogger
method? Could you post the code you used? I am not entirely sure if that
would (always) work correctly.

> I would actually be willing to implement and test it myself, but for the
> moment I'm not exactly sure how/where that would be best in Jaybird. Any
> hints on the subject are welcome, in case I actually get to it in the
> foreseeable future :)
>
> Thanks in advance for any ideas/thoughts on the subject

The most convenient for me would be if you forked the Jaybird project on
GitHub, create a branch in your fork with the changes and then create a
pull request which I can then review and merge.

These changes would either need to be made in
org.firebirdsql.management.FBBackupManager, or if combining streaming
backup with existing server-local backup leads to complex code: in a new
"manager" class.

For contributions I want to have a signed contributor license agreement
(see
https://github.com/FirebirdSQL/jaybird/blob/master/licenses/jaybird-icla.txt
) as I want to be able to change to a different open source license in
the future (there are no plans right now, but I like to keep this option
open).

Mark
--
Mark Rotteveel