简体   繁体   中英

eXist-db embedded mode backup / restore

I'm attempting to use eXist-db in embedded mode in a Java program to produce an interactive fiction game.

Is there any information on invoking backups and restores from within my own java application, so as to initially load the story and all files, and then to perform a save/restore function?

Also, any suggestions on how to format my xml for such use would be appreciated.

You can invoke the backup directly by passing in the URI of your embedded eXist instance. For example:

import org.exist.backup.Backup;

//omitted for brevity

final Backup backup = new Backup("admin, "adminPass", "xmldb:exist:///db") 
backup.backup(false, null);

You can use any collection path instead of just /db . Also if you are running this from within a Swing application you can use:

backup.backup(true, frame);

To have a backup dialog appear.

Hope that helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM