public interface BackupManager extends ServiceManager
Modifier and Type | Field and Description |
---|---|
static int |
BACKUP_CONVERT
Backup external files as tables.
|
static int |
BACKUP_EXPAND
No data compression.
|
static int |
BACKUP_IGNORE_CHECKSUMS
Ignore checksums.
|
static int |
BACKUP_IGNORE_LIMBO
Ignore in-limbo transactions.
|
static int |
BACKUP_METADATA_ONLY
Backup metadata only.
|
static int |
BACKUP_NO_GARBAGE_COLLECT
Do not collect garbage during backup.
|
static int |
BACKUP_NON_TRANSPORTABLE
Use non-transportable backup format.
|
static int |
BACKUP_OLD_DESCRIPTIONS
Save old style metadata descriptions.
|
static int |
RESTORE_DEACTIVATE_INDEX
Deactivate indices during restore.
|
static int |
RESTORE_NO_SHADOW
Do not restore shadow database.
|
static int |
RESTORE_NO_VALIDITY
Do not restore validity constraints.
|
static int |
RESTORE_ONE_AT_A_TIME
Commit after completing restore of each table.
|
static int |
RESTORE_USE_ALL_SPACE
Do not reserve 20% on each page for the future versions, useful for
read-only databases.
|
Modifier and Type | Method and Description |
---|---|
void |
addBackupPath(java.lang.String path)
Add backup file to the list.
|
void |
addBackupPath(java.lang.String path,
int size)
Add the file to the backup of the specified size.
|
void |
addRestorePath(java.lang.String path,
int size)
Add the file to the multi-file database of the specified size for restore
operation.
|
void |
backupDatabase()
Perform the backup operation.
|
void |
backupDatabase(int options)
Perform the backup operation.
|
void |
backupMetadata()
Perform the backup operation, metadata only.
|
void |
clearBackupPaths()
Clear the information about backup paths.
|
void |
clearRestorePaths()
Clear the information about restore paths.
|
void |
restoreDatabase()
Perform the restore operation.
|
void |
restoreDatabase(int options)
Perform the restore operation.
|
void |
setBackupPath(java.lang.String backupPath)
Sets the location of the backup file.
|
void |
setDatabase(java.lang.String path)
Set the path to the database.
|
void |
setRestorePageBufferCount(int bufferCount)
Set the default number of pages to be buffered (cached) by default in a
restored database.
|
void |
setRestorePageSize(int pageSize)
Set the page size that will be used for a restored database.
|
void |
setRestoreReadOnly(boolean readOnly)
Set the read-only attribute on a restored database.
|
void |
setRestoreReplace(boolean replace)
Set the restore operation to create a new database, as opposed to
overwriting an existing database.
|
void |
setVerbose(boolean verbose)
Set whether the operations of this
BackupManager will
result in verbose logging to the configured logger. |
getDatabase, getHost, getLogger, getPassword, getPort, getUser, setHost, setLogger, setPassword, setPort, setUser
static final int BACKUP_IGNORE_CHECKSUMS
static final int BACKUP_IGNORE_LIMBO
static final int BACKUP_METADATA_ONLY
static final int BACKUP_NO_GARBAGE_COLLECT
static final int BACKUP_OLD_DESCRIPTIONS
static final int BACKUP_NON_TRANSPORTABLE
static final int BACKUP_CONVERT
static final int BACKUP_EXPAND
static final int RESTORE_DEACTIVATE_INDEX
static final int RESTORE_NO_SHADOW
static final int RESTORE_NO_VALIDITY
static final int RESTORE_ONE_AT_A_TIME
static final int RESTORE_USE_ALL_SPACE
void setBackupPath(java.lang.String backupPath)
addBackupPath(String, int)
method after calling this one.backupPath
- the location of the backup file.for multi-file backups.
void addBackupPath(java.lang.String path, int size)
path
- path to the backup file.size
- max size of the file in bytes.void addBackupPath(java.lang.String path)
addBackupPath(String, int)
call.
If application invokes backup operation, an error is generated in that call.
path
- path to the backup file.void clearBackupPaths()
addBackupPath(String, int)
or
addBackupPath(String)
methods.void setDatabase(java.lang.String path)
setDatabase
in interface ServiceManager
path
- path to the database file.
In case of backup, value specifies the path of the existing database on the server that will be backed up.
In case of restore, value specifies the path of the single-file database where the backup will be restored to.
void addRestorePath(java.lang.String path, int size)
path
- path to the backup file.size
- max size of the database file in pages.void clearRestorePaths()
addRestorePath(String, int)
or
setDatabase(String)
methods.void backupDatabase() throws java.sql.SQLException
java.sql.SQLException
- if a database error occurs during the backupvoid backupMetadata() throws java.sql.SQLException
java.sql.SQLException
- if a database error occurs during the backupvoid backupDatabase(int options) throws java.sql.SQLException
options
- a bitmask combination of the BACKUP_*
static final fields for the backup operationjava.sql.SQLException
- if a database error occurs during the backupvoid setVerbose(boolean verbose)
BackupManager
will
result in verbose logging to the configured logger.verbose
- If true
, operations will be logged
verbosely, otherwise they will not be logged verboselyvoid setRestorePageBufferCount(int bufferCount)
bufferCount
- The page-buffer size to be used, a positive valuevoid setRestorePageSize(int pageSize)
pageSize
must be one of: 1024, 2048, 4096, 8192 or 16384. The
default value depends on the Firebird version.pageSize
- The page size to be used in a restored database,
one of 1024, 2048, 4196, 8192 or 16384void setRestoreReplace(boolean replace)
replace
- If true
, the restore operation will attempt
to create a new database if it does not exit or overwrite an
existing one when it exists, false
when restore
should fail if database already exist (if it doesn't, a database
will be successfully created).void setRestoreReadOnly(boolean readOnly)
readOnly
- If true
, a restored database will be
read-only, otherwise it will be read-write.void restoreDatabase() throws java.sql.SQLException
java.sql.SQLException
- if a database error occurs during the restorevoid restoreDatabase(int options) throws java.sql.SQLException
options
- A bitmask combination of RESTORE_*
static
final fieldsjava.sql.SQLException
- if a database error occurs during the restoreCopyright © 2001-2019 Jaybird (Firebird JDBC/JCA) team. All rights reserved.