If Derby is running embedded or in client / server mode, you can access the engine instance with the proper JDBC driver. Note that you could also perform an Online Backup as Derby 10.2.x does support this capability:

So it all depends how the persistence framework is configured to access either Derby embedded in the same JVM or in client / server mode to a standalone Derby server. You can also run Derby in embedded server mode, meaning that you could even access it remotely if it runs in the same JVM as the persistence framework:
See http://db.apache.org/derby/docs/dev/adminguide/adminguide-single.html#cadminov17524 (embedded server example)

For more information on how to connect to a Derby instance, check:

The whole online documentation set is at:

Hope this helps,


On 2/7/07, frederic barachant <ms.barachant@free.fr> wrote:
I wish to use derby as my javax.persistence database (toplink,
hibernate, ...). That should pose no problem, but i would like to be
able to access the Database instance that is used to store my data, as i
would need to backup it from time to time, ideally by getting a
reference to it just the time to do that operation. Database would be local.
How can i get the Database, if i ensure that any info used to open the
connection is known ( persistence unit XML parsing, ...) ?

Thank you.