org.firebirdsql.management

## 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.FBServiceManager

`BUFFER_SIZE`

### Constructor Summary

Constructors
Constructor and Description
`FBNBackupManager()` Create a new instance of `FBNBackupManager` based on the default GDSType.
`FBNBackupManager(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

All Methods Instance Methods Concrete Methods
`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

`attachDatabase, attachServiceManager, createRequestBuffer, executeServicesOperation, executeServicesOperation, getAuthPlugins, getCharSet, getDatabase, getDbCryptConfig, getHost, getLogger, getPassword, getPort, getServerVersion, getServiceName, getUser, getWireCrypt, isWireCompression, queueService, setAuthPlugins, setCharSet, setDbCryptConfig, setHost, setLogger, setPassword, setPort, setUser, setWireCompression, setWireCrypt`

### 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

`getAuthPlugins, getCharSet, getDatabase, getDbCryptConfig, getHost, getLogger, getPassword, getPort, getServerVersion, getUser, getWireCrypt, isWireCompression, setAuthPlugins, setCharSet, setDbCryptConfig, setHost, setLogger, setPassword, setPort, setUser, setWireCompression, setWireCrypt`

### 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(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.

#### 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.

#### 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`

#### 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.

#### 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

#### 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

#### 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`