org.firebirdsql.management
Class FBNBackupManager

java.lang.Object
  extended by org.firebirdsql.management.FBServiceManager
      extended by 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

Field Summary
 
Fields inherited from class org.firebirdsql.management.FBServiceManager
BUFFER_SIZE
 
Constructor Summary
FBNBackupManager()
          Create a new instance of FBNBackupManager based on the default GDSType.
FBNBackupManager(org.firebirdsql.gds.impl.GDSType gdsType)
          Create a new instance of FBNBackupManager based on a given GDSType.
FBNBackupManager(java.lang.String gdsType)
          Create a new instance of FBNBackupManager based on a given GDSType.
 
Method Summary
 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 backupLevel)
          Sets the backup level (0 = full, 1..n = incremental)
 void setDatabase(java.lang.String database)
          Sets the database path for the connection to the service manager.
 void setNoDBTriggers(boolean noDBTriggers)
          Sets the backup option no database triggers when connecting at backup.
 
Methods inherited from class org.firebirdsql.management.FBServiceManager
attachServiceManager, createRequestBuffer, detachServiceManager, executeServicesOperation, getDatabase, getGds, getHost, getLogger, getPassword, getPort, getServiceName, getUser, queueService, setHost, setLogger, setPassword, setPort, setUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.firebirdsql.management.ServiceManager
getDatabase, getHost, getLogger, getPassword, getPort, getUser, setHost, setLogger, setPassword, setPort, setUser
 

Constructor Detail

FBNBackupManager

public FBNBackupManager()
Create a new instance of FBNBackupManager based on the default GDSType.


FBNBackupManager

public FBNBackupManager(java.lang.String gdsType)
Create a new instance of FBNBackupManager based on a given GDSType.

Parameters:
gdsType - type must be PURE_JAVA, EMBEDDED, or NATIVE

FBNBackupManager

public FBNBackupManager(org.firebirdsql.gds.impl.GDSType gdsType)
Create a new instance of FBNBackupManager based on a given GDSType.

Parameters:
gdsType - type must be PURE_JAVA, EMBEDDED, or NATIVE
Method Detail

setBackupFile

public void setBackupFile(java.lang.String backupFile)
Description copied from interface: NBackupManager
Sets the location of the backup file.

Specified by:
setBackupFile in interface NBackupManager
Parameters:
backupFile - the location of the backup file.
See Also:
NBackupManager.setBackupFile(java.lang.String)

addBackupFile

public void addBackupFile(java.lang.String backupFile)
Description copied from interface: NBackupManager
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.

Specified by:
addBackupFile in interface NBackupManager
Parameters:
backupFile - the location of the backup file.
See Also:
NBackupManager.addBackupFile(java.lang.String)

clearBackupFiles

public void clearBackupFiles()
Description copied from interface: NBackupManager
Clear the information about backup files. This method undoes all parameters set in the NBackupManager.addBackupFile(String) method.

Specified by:
clearBackupFiles in interface NBackupManager
See Also:
NBackupManager.clearBackupFiles()

setDatabase

public void setDatabase(java.lang.String database)
Description copied from interface: ServiceManager
Sets the database path for the connection to the service manager.

Specified by:
setDatabase in interface NBackupManager
Specified by:
setDatabase in interface ServiceManager
Overrides:
setDatabase in class FBServiceManager
Parameters:
database - path for the connection to the service manager.
See Also:
ServiceManager.setDatabase(java.lang.String)

backupDatabase

public void backupDatabase()
                    throws java.sql.SQLException
Description copied from interface: NBackupManager
Perform the backup operation.

Specified by:
backupDatabase in interface NBackupManager
Throws:
java.sql.SQLException - if a database error occurs during the backup
See Also:
NBackupManager.backupDatabase()

restoreDatabase

public void restoreDatabase()
                     throws java.sql.SQLException
Description copied from interface: NBackupManager
Perform the restore operation.

Specified by:
restoreDatabase in interface NBackupManager
Throws:
java.sql.SQLException - if a database error occurs during the restore
See Also:
NBackupManager.restoreDatabase()

setBackupLevel

public void setBackupLevel(int backupLevel)
Description copied from interface: NBackupManager
Sets the backup level (0 = full, 1..n = incremental)

Specified by:
setBackupLevel in interface NBackupManager
Parameters:
backupLevel - backup level (e.g. 0 = full backup, 1 = level 1 incremental backup based on level 0 backup
See Also:
NBackupManager.setBackupLevel(int)

setNoDBTriggers

public void setNoDBTriggers(boolean noDBTriggers)
Description copied from interface: NBackupManager
Sets the backup option no database triggers when connecting at backup.

Specified by:
setNoDBTriggers in interface NBackupManager
See Also:
NBackupManager.setNoDBTriggers(boolean)


Copyright © 2001-2019 Jaybird (Firebird JDBC/JCA) team. All rights reserved.