public interface NBackupManager extends ServiceManager
Modifier and Type | Method and Description |
---|---|
void |
addBackupFile(java.lang.String backupFile)
Add additional backup files.
|
void |
backupDatabase()
Perform the backup operation.
|
void |
clearBackupFiles()
Clear the information about backup files.
|
void |
restoreDatabase()
Perform the restore operation.
|
void |
setBackupFile(java.lang.String backupFile)
Sets the location of the backup file.
|
void |
setBackupGuid(java.lang.String guid)
Sets the backup GUID (Firebird 4 and higher only).
|
void |
setBackupLevel(int level)
Sets the backup level (0 = full, 1..n = incremental)
|
void |
setCleanHistory(boolean cleanHistory)
Enables clean history on backup.
|
void |
setDatabase(java.lang.String path)
Set the path to the database.
|
void |
setInPlaceRestore(boolean inPlaceRestore)
Enables in-place restore.
|
void |
setKeepDays(int days)
Sets the number of days of backup history to keep.
|
void |
setKeepRows(int rows)
Sets the number of rows of backup history to keep (this includes the row created by the backup).
|
void |
setNoDBTriggers(boolean noDBTriggers)
Sets the option no database triggers when connecting at backup or in-place restore.
|
getAuthPlugins, getCharSet, getDatabase, getDbCryptConfig, getHost, getLogger, getPassword, getPort, getServerVersion, getUser, getWireCrypt, isWireCompression, setAuthPlugins, setCharSet, setDbCryptConfig, setHost, setLogger, setPassword, setPort, setUser, setWireCompression, setWireCrypt
void setBackupFile(java.lang.String backupFile)
Warning: this method behaves identical to addBackupFile(String)
.
backupFile
- the location of the backup file.void addBackupFile(java.lang.String backupFile)
Specifying multiple backup files is only valid for restore, for backup only the first file is used.
Use clearBackupFiles()
to clear earlier backup files.
backupFile
- the location of the backup file.void clearBackupFiles()
addBackupFile(String)
method.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 database where the backup will be restored to.
void backupDatabase() throws java.sql.SQLException
java.sql.SQLException
- if a database error occurs during the backupvoid restoreDatabase() throws java.sql.SQLException
java.sql.SQLException
- if a database error occurs during the restorevoid setBackupLevel(int level)
level
- backup level (e.g. 0 = full backup, 1 = level 1 incremental backup based on level 0 backupvoid setBackupGuid(java.lang.String guid)
The backup GUID is the GUID of a previous backup of the (source) database. This is used by Firebird to backup the pages modified since that backup.
This setting is mutually exclusive with setBackupLevel(int)
, but this is only checked server-side.
guid
- A GUID string of a previous backup, enclosed in braces.void setNoDBTriggers(boolean noDBTriggers)
noDBTriggers
- true
disable db triggers during backup or in-place restore.void setInPlaceRestore(boolean inPlaceRestore)
inPlaceRestore
- true
to enable in-place restorevoid setCleanHistory(boolean cleanHistory)
The backup will fail if setKeepDays(int)
or setKeepRows(int)
has not been called.
cleanHistory
- true
to enable clean historyvoid setKeepDays(int days)
Server-side, this option is mutually exclusive with setKeepRows(int)
, this is not enforced by the Java
code.
This option only has effect when setCleanHistory(true)
has been called.
days
- number of days to keep history when cleaning, or -1
to clear current valuesetCleanHistory(boolean)
,
setKeepRows(int)
void setKeepRows(int rows)
Server-side, this option is mutually exclusive with setKeepDays(int)
, this is not enforced by the Java
code.
This option only has effect when setCleanHistory(true)
has been called.
rows
- number of rows to keep history when cleaning, or -1
to clear current valuesetCleanHistory(boolean)
,
setKeepDays(int)
Copyright © 2001-2023 Jaybird (Firebird JDBC/JCA) team. All rights reserved.