Class FBNBackupManager
- java.lang.Object
- 
- org.firebirdsql.management.FBServiceManager
- 
- org.firebirdsql.management.FBNBackupManager
 
 
- 
- All Implemented Interfaces:
- NBackupManager,- ServiceManager
 
 public class FBNBackupManager extends FBServiceManager implements NBackupManager Implements the incremental backup and restore functionality of NBackup via the Firebird Services API.- Author:
- Thomas Steinmaurer, Mark Rotteveel
 
- 
- 
Field Summary- 
Fields inherited from class org.firebirdsql.management.FBServiceManagerBUFFER_SIZE
 
- 
 - 
Constructor SummaryConstructors Constructor Description FBNBackupManager()Create a new instance ofFBNBackupManagerbased on the default GDSType.FBNBackupManager(java.lang.String gdsType)Create a new instance ofFBNBackupManagerbased on a given GDSType.FBNBackupManager(GDSType gdsType)Create a new instance ofFBNBackupManagerbased on a given GDSType.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBackupFile(java.lang.String backupFile)Add additional backup files.voidbackupDatabase()Perform the backup operation.voidclearBackupFiles()Clear the information about backup files.voidrestoreDatabase()Perform the restore operation.voidsetBackupFile(java.lang.String backupFile)Sets the location of the backup file.voidsetBackupGuid(java.lang.String guid)Sets the backup GUID (Firebird 4 and higher only).voidsetBackupLevel(int backupLevel)Sets the backup level (0 = full, 1..n = incremental)voidsetCleanHistory(boolean cleanHistory)Enables clean history on backup.voidsetInPlaceRestore(boolean inPlaceRestore)Enables in-place restore.voidsetKeepDays(int days)Sets the number of days of backup history to keep.voidsetKeepRows(int rows)Sets the number of rows of backup history to keep (this includes the row created by the backup).voidsetNoDBTriggers(boolean noDBTriggers)Sets the option no database triggers when connecting at backup or in-place restore.- 
Methods inherited from class org.firebirdsql.management.FBServiceManagerattachDatabase, attachServiceManager, createRequestBuffer, executeServicesOperation, executeServicesOperation, getAuthPlugins, getCharSet, getDatabase, getDbCryptConfig, getHost, getLogger, getPassword, getPort, getServerVersion, getServiceName, getUser, getWireCrypt, isWireCompression, queueService, setAuthPlugins, setCharSet, setDatabase, setDbCryptConfig, setHost, setLogger, setPassword, setPort, setUser, setWireCompression, setWireCrypt
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.firebirdsql.management.NBackupManagersetDatabase
 - 
Methods inherited from interface org.firebirdsql.management.ServiceManagergetAuthPlugins, getCharSet, getDatabase, getDbCryptConfig, getHost, getLogger, getPassword, getPort, getServerVersion, getUser, getWireCrypt, isWireCompression, setAuthPlugins, setCharSet, setDbCryptConfig, setHost, setLogger, setPassword, setPort, setUser, setWireCompression, setWireCrypt
 
- 
 
- 
- 
- 
Constructor Detail- 
FBNBackupManagerpublic FBNBackupManager() Create a new instance ofFBNBackupManagerbased on the default GDSType.
 - 
FBNBackupManagerpublic FBNBackupManager(java.lang.String gdsType) Create a new instance ofFBNBackupManagerbased on a given GDSType.- Parameters:
- gdsType- type must be PURE_JAVA, EMBEDDED, or NATIVE
 
 - 
FBNBackupManagerpublic FBNBackupManager(GDSType gdsType) Create a new instance ofFBNBackupManagerbased on a given GDSType.- Parameters:
- gdsType- type must be PURE_JAVA, EMBEDDED, or NATIVE
 
 
- 
 - 
Method Detail- 
setBackupFilepublic void setBackupFile(java.lang.String backupFile) Description copied from interface:NBackupManagerSets the location of the backup file.Warning: this method behaves identical to NBackupManager.addBackupFile(String).- Specified by:
- setBackupFilein interface- NBackupManager
- Parameters:
- backupFile- the location of the backup file.
 
 - 
addBackupFilepublic void addBackupFile(java.lang.String backupFile) Description copied from interface:NBackupManagerAdd additional backup files.Specifying multiple backup files is only valid for restore, for backup only the first file is used. Use NBackupManager.clearBackupFiles()to clear earlier backup files.- Specified by:
- addBackupFilein interface- NBackupManager
- Parameters:
- backupFile- the location of the backup file.
 
 - 
clearBackupFilespublic void clearBackupFiles() Description copied from interface:NBackupManagerClear the information about backup files. This method undoes all parameters set in theNBackupManager.addBackupFile(String)method.- Specified by:
- clearBackupFilesin interface- NBackupManager
 
 - 
backupDatabasepublic void backupDatabase() throws java.sql.SQLExceptionDescription copied from interface:NBackupManagerPerform the backup operation.- Specified by:
- backupDatabasein interface- NBackupManager
- Throws:
- java.sql.SQLException- if a database error occurs during the backup
 
 - 
restoreDatabasepublic void restoreDatabase() throws java.sql.SQLExceptionDescription copied from interface:NBackupManagerPerform the restore operation.- Specified by:
- restoreDatabasein interface- NBackupManager
- Throws:
- java.sql.SQLException- if a database error occurs during the restore
- See Also:
- NBackupManager.restoreDatabase()
 
 - 
setBackupLevelpublic void setBackupLevel(int backupLevel) Description copied from interface:NBackupManagerSets the backup level (0 = full, 1..n = incremental)- Specified by:
- setBackupLevelin interface- NBackupManager
- Parameters:
- backupLevel- backup level (e.g. 0 = full backup, 1 = level 1 incremental backup based on level 0 backup
 
 - 
setBackupGuidpublic void setBackupGuid(java.lang.String guid) Description copied from interface:NBackupManagerSets the backup GUID (Firebird 4 and higher only).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 NBackupManager.setBackupLevel(int), but this is only checked server-side.- Specified by:
- setBackupGuidin interface- NBackupManager
- Parameters:
- guid- A GUID string of a previous backup, enclosed in braces.
 
 - 
setNoDBTriggerspublic void setNoDBTriggers(boolean noDBTriggers) Description copied from interface:NBackupManagerSets the option no database triggers when connecting at backup or in-place restore.- Specified by:
- setNoDBTriggersin interface- NBackupManager
- Parameters:
- noDBTriggers-- truedisable db triggers during backup or in-place restore.
 
 - 
setInPlaceRestorepublic void setInPlaceRestore(boolean inPlaceRestore) Description copied from interface:NBackupManagerEnables in-place restore.- Specified by:
- setInPlaceRestorein interface- NBackupManager
- Parameters:
- inPlaceRestore-- trueto enable in-place restore
 
 - 
setCleanHistorypublic void setCleanHistory(boolean cleanHistory) Description copied from interface:NBackupManagerEnables clean history on backup.The backup will fail if NBackupManager.setKeepDays(int)orNBackupManager.setKeepRows(int)has not been called.- Specified by:
- setCleanHistoryin interface- NBackupManager
- Parameters:
- cleanHistory-- trueto enable clean history
 
 - 
setKeepDayspublic void setKeepDays(int days) Description copied from interface:NBackupManagerSets the number of days of backup history to keep.Server-side, this option is mutually exclusive with NBackupManager.setKeepRows(int), this is not enforced by the Java code.This option only has effect when setCleanHistory(true)has been called.- Specified by:
- setKeepDaysin interface- NBackupManager
- Parameters:
- days- number of days to keep history when cleaning, or- -1to clear current value
- See Also:
- NBackupManager.setCleanHistory(boolean),- NBackupManager.setKeepRows(int)
 
 - 
setKeepRowspublic void setKeepRows(int rows) Description copied from interface:NBackupManagerSets the number of rows of backup history to keep (this includes the row created by the backup).Server-side, this option is mutually exclusive with NBackupManager.setKeepDays(int), this is not enforced by the Java code.This option only has effect when setCleanHistory(true)has been called.- Specified by:
- setKeepRowsin interface- NBackupManager
- Parameters:
- rows- number of rows to keep history when cleaning, or- -1to clear current value
- See Also:
- NBackupManager.setCleanHistory(boolean),- NBackupManager.setKeepDays(int)
 
 
- 
 
-