Class FBBackupManager

    • Constructor Detail

      • FBBackupManager

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

        public FBBackupManager​(java.lang.String gdsType)
        Create a new instance of FBBackupManager based on a given GDSType.
        Parameters:
        gdsType - type must be PURE_JAVA, EMBEDDED, or NATIVE
      • FBBackupManager

        public FBBackupManager​(GDSType gdsType)
        Create a new instance of FBBackupManager based on a given GDSType.
        Parameters:
        gdsType - type must be PURE_JAVA, EMBEDDED, or NATIVE
    • Method Detail

      • setBackupPath

        public void setBackupPath​(java.lang.String backupPath)
        Description copied from interface: BackupManager
        Sets the location of the backup file. This method is used to set the path to the backup consisting of a single file. It is not possible to add multiple files or specify the max. size of the file using this method. It is also not possible to call BackupManager.addBackupPath(String, int) method after calling this one.
        Specified by:
        setBackupPath in interface BackupManager
        Parameters:
        backupPath - the location of the backup file.
        See Also:
        for multi-file backups.
      • addBackupPath

        public void addBackupPath​(java.lang.String path,
                                  int size)
        Description copied from interface: BackupManager
        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:
        addBackupPath in interface BackupManager
        Parameters:
        path - path to the backup file.
        size - max size of the file in bytes.
      • backupDatabase

        public void backupDatabase​(int options)
                            throws java.sql.SQLException
        Description copied from interface: BackupManager
        Perform the backup operation.
        Specified by:
        backupDatabase in interface BackupManager
        Parameters:
        options - a bitmask combination of the BACKUP_* constants for the backup operation
        Throws:
        java.sql.SQLException - if a database error occurs during the backup
      • restoreDatabase

        public void restoreDatabase​(int options)
                             throws java.sql.SQLException
        Description copied from interface: BackupManager
        Perform the restore operation.
        Specified by:
        restoreDatabase in interface BackupManager
        Parameters:
        options - A bitmask combination of RESTORE_* constants
        Throws:
        java.sql.SQLException - if a database error occurs during the restore
      • addBackupsToBackupRequestBuffer

        protected void addBackupsToBackupRequestBuffer​(FbService service,
                                                       ServiceRequestBuffer backupSPB)
                                                throws java.sql.SQLException
        Adds the currentDatabase as a source for the backup operation
        Specified by:
        addBackupsToBackupRequestBuffer in class FBBackupManagerBase
        Parameters:
        backupSPB - The buffer to be used during the backup operation
        Throws:
        java.sql.SQLException