Package org.firebirdsql.management
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addBackupFile(java.lang.String backupFile)
Add the file to the backup of the specified size.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
setBackupLevel(int level)
Sets the backup level (0 = full, 1..n = incremental)void
setDatabase(java.lang.String path)
Set the path to the database.void
setNoDBTriggers(boolean noDBTriggers)
Sets the backup option no database triggers when connecting at backup.-
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.- Parameters:
backupFile
- the location of the backup file.
-
addBackupFile
void addBackupFile(java.lang.String backupFile)
Add the file to the backup of the specified size. Firebird allows splitting the backup into multiple files, limiting the size of the backup file. This can be useful for example for creating a backup on CD or DVD.- 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:
setDatabase
in 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.SQLException
Perform the backup operation.- Throws:
java.sql.SQLException
- if a database error occurs during the backup
-
restoreDatabase
void restoreDatabase() throws java.sql.SQLException
Perform 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
-
setNoDBTriggers
void setNoDBTriggers(boolean noDBTriggers)
Sets the backup option no database triggers when connecting at backup.- Parameters:
noDBTriggers
-
-
-