This is how we backup Xodus:
PersistentEntityStore store = manager.getPersistentEntityStore(xodusRoot, appId);
final File backupFile = CompressBackupUtil.backup(store, new File(store.getLocation(), "backups"), null, true);
Using this ZIP file what is the safest way to restore the backup on a "production" or "live" server?
The only possible option is to unzip backup file and open a new PersistentEntityStore
. You can keep open current instance of PersistentEntityStore
until the backup is unzipped to a new location. Then you can open a new instance of PersistentEntityStore
above the new location and switch atomically database load to the new instance.