Subject Re: [Firebird-Java] FBBackupManager - backup remote database to a local hard disk ?
Author Roman Rokytskyy
> My name is Mali. I work in a quite big company in Poland. Currently we are
> working on large system for administration units in our country.
> System spec. is: Java WebStrart - JBoss - Firebird 2.1.
> My Current task is to write a tool (in java) which provide backup and
> restore firebird database.
> My question is:
> How can i backup remote database on a local hard disk with jaybird ?
> I know this is possible using gbak utility:
> gbak -b -v 192.168.0.20:/dbases/mydb.fdb C:\mybackup.fbk -user SYSDBA
> -pass 123456 (http://www.firebirdfaq.org/faq62/)

FBBackupManager backupManager = new FBBackupManager();
backupManager.setHost("192.168.0.20");
backupManager.setPort(3050);
backupManager.setUser("SYSDBA");
backupManager.setPassword("123456");
backupManager.setDatabase("/dbases/mydb.fdb");
backupManager.setBackupPath("/dbases/mybackup.fbk");
backupManager.setLogger(System.out);
backupManager.setVerbose(true);

The only issue is that in your example gbak will dump data from remote
server to your local disk, in this Java example the backupPath is a path
on the remote server. This is due to the fact that Java API uses
Firebird Services and those operate on server.

Roman