Interface NBackupManager
-
- All Superinterfaces:
ServiceManager
- All Known Implementing Classes:
FBNBackupManager
public interface NBackupManager extends ServiceManager
Implements the incremental backup and restore functionality of NBackup via the Firebird Services API.- Author:
- Thomas Steinmaurer, Mark Rotteveel
-
-
Method Summary
All Methods Instance Methods Abstract 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 level)Sets the backup level (0 = full, 1..n = incremental)voidsetDatabase(java.lang.String path)Set the path to the database.voidsetInPlaceRestore(boolean inPlaceRestore)Enables in-place restore.voidsetNoDBTriggers(boolean noDBTriggers)Sets the option no database triggers when connecting at backup or in-place restore.-
Methods inherited from interface org.firebirdsql.management.ServiceManager
getAuthPlugins, getCharSet, getDatabase, getDbCryptConfig, getHost, getLogger, getPassword, getPort, getServerVersion, getUser, getWireCrypt, isWireCompression, setAuthPlugins, setCharSet, setDbCryptConfig, setHost, setLogger, setPassword, setPort, setUser, setWireCompression, setWireCrypt
-
-
-
-
Method Detail
-
setBackupFile
void setBackupFile(java.lang.String backupFile)
Sets the location of the backup file.Warning: this method behaves identical to
addBackupFile(String).- Parameters:
backupFile- the location of the backup file.
-
addBackupFile
void addBackupFile(java.lang.String backupFile)
Add additional backup files.Specifying multiple backup files is only valid for restore, for backup only the first file is used.
Use
clearBackupFiles()to clear earlier backup files.- Parameters:
backupFile- the location of the backup file.
-
clearBackupFiles
void clearBackupFiles()
Clear the information about backup files. This method undoes all parameters set in theaddBackupFile(String)method.
-
setDatabase
void setDatabase(java.lang.String path)
Set the path to the database. This method is used both for backup and restore operation.- Specified by:
setDatabasein interfaceServiceManager- Parameters:
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.
-
backupDatabase
void backupDatabase() throws java.sql.SQLExceptionPerform the backup operation.- Throws:
java.sql.SQLException- if a database error occurs during the backup
-
restoreDatabase
void restoreDatabase() throws java.sql.SQLExceptionPerform the restore operation.- Throws:
java.sql.SQLException- if a database error occurs during the restore
-
setBackupLevel
void setBackupLevel(int level)
Sets the backup level (0 = full, 1..n = incremental)- Parameters:
level- backup level (e.g. 0 = full backup, 1 = level 1 incremental backup based on level 0 backup
-
setBackupGuid
void setBackupGuid(java.lang.String guid)
Sets 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
setBackupLevel(int), but this is only checked server-side.- Parameters:
guid- A GUID string of a previous backup, enclosed in braces.- Since:
- 4.0.4
-
setNoDBTriggers
void setNoDBTriggers(boolean noDBTriggers)
Sets the option no database triggers when connecting at backup or in-place restore.- Parameters:
noDBTriggers-truedisable db triggers during backup or in-place restore.
-
setInPlaceRestore
void setInPlaceRestore(boolean inPlaceRestore)
Enables in-place restore.- Parameters:
inPlaceRestore-trueto enable in-place restore- Since:
- 4.0.4
-
-