public class FBStreamingBackupManager extends FBBackupManagerBase implements BackupManager
FBBackupManagerBase.PathSizeStruct
noLimitRestore, restorePaths, verbose
BUFFER_SIZE
BACKUP_CONVERT, BACKUP_EXPAND, BACKUP_IGNORE_CHECKSUMS, BACKUP_IGNORE_LIMBO, BACKUP_METADATA_ONLY, BACKUP_NO_GARBAGE_COLLECT, BACKUP_NON_TRANSPORTABLE, BACKUP_OLD_DESCRIPTIONS, RESTORE_DEACTIVATE_INDEX, RESTORE_NO_SHADOW, RESTORE_NO_VALIDITY, RESTORE_ONE_AT_A_TIME, RESTORE_USE_ALL_SPACE
Constructor and Description |
---|
FBStreamingBackupManager()
Create a new instance of
FBStreamingBackupManager based on
the default GDSType. |
FBStreamingBackupManager(GDSType gdsType)
Create a new instance of
FBStreamingBackupManager based on a
given GDSType. |
FBStreamingBackupManager(java.lang.String gdsType)
Create a new instance of
FBStreamingBackupManager based on a
given GDSType. |
Modifier and Type | Method and Description |
---|---|
void |
addBackupPath(java.lang.String path,
int size)
Add the file to the backup of the specified size.
|
protected void |
addBackupsToBackupRequestBuffer(FbService service,
ServiceRequestBuffer backupSPB)
Adds stdout as a source for the backup operation
|
protected void |
addBackupsToRestoreRequestBuffer(FbService service,
ServiceRequestBuffer restoreSPB)
Adds stdin as a source for the restore operation
|
void |
backupDatabase(int options)
Perform the backup operation.
|
void |
clearBackupPaths()
Clear the information about backup paths.
|
void |
restoreDatabase(int options)
Perform the restore operation.
|
void |
setBackupBufferSize(int bufferSize)
Set the local buffer size to be used when doing a backup.
|
void |
setBackupOutputStream(java.io.OutputStream backupStream) |
void |
setBackupPath(java.lang.String backupPath)
Sets the location of the backup file.
|
void |
setRestoreInputStream(java.io.InputStream restoreStream) |
void |
setRestorePageSize(int pageSize)
Set the page size that will be used for a restored database.
|
protected boolean |
verboseBackup()
Streaming backups are currently not capable of verbose output
|
addBackupPath, addRestorePath, backupDatabase, backupMetadata, clearRestorePaths, getBackupSRB, getRestoreSRB, restoreDatabase, setDatabase, setRestorePageBufferCount, setRestoreReadOnly, setRestoreReplace, setVerbose
attachDatabase, attachServiceManager, createRequestBuffer, executeServicesOperation, executeServicesOperation, getCharSet, getDatabase, getDbCryptConfig, getHost, getLogger, getPassword, getPort, getServerVersion, getServiceName, getUser, getWireCrypt, queueService, setCharSet, setDbCryptConfig, setHost, setLogger, setPassword, setPort, setUser, setWireCrypt
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addBackupPath, addRestorePath, backupDatabase, backupMetadata, clearRestorePaths, restoreDatabase, setDatabase, setRestorePageBufferCount, setRestoreReadOnly, setRestoreReplace, setVerbose
getCharSet, getDatabase, getDbCryptConfig, getHost, getLogger, getPassword, getPort, getServerVersion, getUser, getWireCrypt, setCharSet, setDbCryptConfig, setHost, setLogger, setPassword, setPort, setUser, setWireCrypt
public FBStreamingBackupManager()
FBStreamingBackupManager
based on
the default GDSType.public FBStreamingBackupManager(java.lang.String gdsType)
FBStreamingBackupManager
based on a
given GDSType.gdsType
- type must be PURE_JAVA, EMBEDDED, or NATIVEpublic FBStreamingBackupManager(GDSType gdsType)
FBStreamingBackupManager
based on a
given GDSType.gdsType
- type must be PURE_JAVA, EMBEDDED, or NATIVEpublic void setBackupBufferSize(int bufferSize)
bufferSize
- The buffer size to be used, a positive valuepublic void setBackupPath(java.lang.String backupPath)
BackupManager
BackupManager.addBackupPath(String, int)
method after calling this one.setBackupPath
in interface BackupManager
backupPath
- the location of the backup file.for multi-file backups.
public void addBackupPath(java.lang.String path, int size)
BackupManager
addBackupPath
in interface BackupManager
path
- path to the backup file.size
- max size of the file in bytes.public void setBackupOutputStream(java.io.OutputStream backupStream)
public void setRestoreInputStream(java.io.InputStream restoreStream)
public void clearBackupPaths()
BackupManager
BackupManager.addBackupPath(String, int)
or
BackupManager.addBackupPath(String)
methods.clearBackupPaths
in interface BackupManager
public void backupDatabase(int options) throws java.sql.SQLException
BackupManager
backupDatabase
in interface BackupManager
options
- a bitmask combination of the BACKUP_*
constants for the backup operationjava.sql.SQLException
- if a database error occurs during the backuppublic void restoreDatabase(int options) throws java.sql.SQLException
BackupManager
restoreDatabase
in interface BackupManager
options
- A bitmask combination of RESTORE_*
constantsjava.sql.SQLException
- if a database error occurs during the restoreprotected boolean verboseBackup()
verboseBackup
in class FBBackupManagerBase
public void setRestorePageSize(int pageSize)
pageSize
must be one of: 4096, 8192 or 16384. The
default value depends on the Firebird version. Pages smaller than 4096
were dropped in 2006 and are by definition unavailable with the streaming
functionality of the Services APIsetRestorePageSize
in interface BackupManager
setRestorePageSize
in class FBBackupManagerBase
pageSize
- The page size to be used in a restored database, one of 4196, 8192 or 16384PageSizeConstants
protected void addBackupsToBackupRequestBuffer(FbService service, ServiceRequestBuffer backupSPB)
addBackupsToBackupRequestBuffer
in class FBBackupManagerBase
backupSPB
- The buffer to be used during the backup operationprotected void addBackupsToRestoreRequestBuffer(FbService service, ServiceRequestBuffer restoreSPB)
addBackupsToRestoreRequestBuffer
in class FBBackupManagerBase
restoreSPB
- The buffer to be used during the restore operationCopyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.