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:
http://db.apache.org/derby/docs/dev/adminguide/cadminhubbkup01.html

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:
http://db.apache.org/derby/docs/dev/devguide/devguide-single.html#cdevdvlp19524
http://db.apache.org/derby/docs/dev/getstart/getstart-single.html#cgsquck70629

The whole online documentation set is at:
http://db.apache.org/derby/manuals/index.html

Hope this helps,

--francois

On 2/7/07, frederic barachant <ms.barachant@free.fr> wrote:
Hello.
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.