public class DerbyBackupOperationsHelper extends Object
EmbeddedDerbyResource
to implement online backup operations on the instance.Constructor and Description |
---|
DerbyBackupOperationsHelper(EmbeddedDerbyResource embeddedDerbyResource)
Initializes the backup operations helper with the derby resource.
|
Modifier and Type | Method and Description |
---|---|
void |
backupLiveDatabase(File backupDir,
boolean waitForTransactions,
boolean enableArchiveLogging,
boolean deleteArchivedLogs)
Perform an online backup of the running instance.
|
public DerbyBackupOperationsHelper(EmbeddedDerbyResource embeddedDerbyResource)
embeddedDerbyResource
- The derby resource on which backup operations will be invoked.public void backupLiveDatabase(File backupDir, boolean waitForTransactions, boolean enableArchiveLogging, boolean deleteArchivedLogs) throws SQLException
SYSCS_UTIL.SYSCS_BACKUP_DATABASE
if enableArchiveLogging
is set to false
or SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE
otherwise. If the
waitForTransactions
parameter is set to false
the _NOWAIT
versions of the
procedures are used.
For more information on backing up Derby database, see Using the backup procedures to perform an online backup in the Derby Administrators guide.
backupDir
- The directory to which the database should be backed up.waitForTransactions
- Wait for running transactions to complete.enableArchiveLogging
- If archive logging should be enabled for the database.deleteArchivedLogs
- Ask Derby to delete the old archive logs after the backup is successful.SQLException
- Exception from Derby when the backup fails.Copyright © 2015-2016 Development Entropy (deventropy.org) Contributors