Subject Re: [Firebird-Java] Are there plans for streaming backup support?
Author Mark Rotteveel
On 16-1-2016 14:18, Ivan Arabadzhiev intelrullz@...
[Firebird-Java] wrote:
> 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
> <http://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)

Thanks. I believe that in this case the stream should only contain the
backup information. So as far as I know the code above should indeed
work correctly, but as I haven't really looked into the streaming backup
functionality I am not entirely sure. Of course, for it to be feature
complete it would also need the streaming restore functionality ;)

> 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).

It looks like it would be. If it turns out to be simple enough, I might
even squeeze it into Jaybird 3.0.

> 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.

No problem. Contributions are always welcome, but I also understand time
constraints :).

Mark
--
Mark Rotteveel