Interface BackupAdmin

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
BackupAdminImpl

@Private public interface BackupAdmin extends Closeable
The administrative API for HBase Backup. Construct an instance and call Closeable.close() afterwards.

BackupAdmin can be used to create backups, restore data from backups and for other backup-related operations.

Since:
2.0
  • Method Details

    • backupTables

      Backup given list of tables fully. This is a synchronous operation. It returns backup id on success or throw exception on failure.
      Parameters:
      userRequest - BackupRequest instance
      Returns:
      the backup Id
      Throws:
      IOException
    • restore

      void restore(RestoreRequest request) throws IOException
      Restore backup
      Parameters:
      request - restore request
      Throws:
      IOException - exception
    • getBackupInfo

      Describe backup image command
      Parameters:
      backupId - backup id
      Returns:
      backup info
      Throws:
      IOException - exception
    • deleteBackups

      int deleteBackups(String[] backupIds) throws IOException
      Delete backup image command
      Parameters:
      backupIds - array of backup ids
      Returns:
      total number of deleted sessions
      Throws:
      IOException - exception
    • mergeBackups

      void mergeBackups(String[] backupIds) throws IOException
      Merge backup images command
      Parameters:
      backupIds - array of backup ids of images to be merged The resulting backup image will have the same backup id as the most recent image from a list of images to be merged
      Throws:
      IOException - exception
    • getHistory

      Retrieve info about the most recent backups.
      Parameters:
      n - number of backup infos desired
      f - optional filters, only entries passing the filters will be returned
      Returns:
      a list of at most n entries, ordered from newest (most recent) to oldest (least recent)
      Throws:
      IOException - exception
    • listBackupSets

      Backup sets list command - list all backup sets. Backup set is a named group of tables.
      Returns:
      all registered backup sets
      Throws:
      IOException - exception
    • getBackupSet

      Backup set describe command. Shows list of tables in this particular backup set.
      Parameters:
      name - set name
      Returns:
      backup set description or null
      Throws:
      IOException - exception
    • deleteBackupSet

      boolean deleteBackupSet(String name) throws IOException
      Delete backup set command
      Parameters:
      name - backup set name
      Returns:
      true, if success, false - otherwise
      Throws:
      IOException - exception
    • addToBackupSet

      void addToBackupSet(String name, TableName[] tables) throws IOException
      Add tables to backup set command
      Parameters:
      name - name of backup set.
      tables - array of tables to be added to this set.
      Throws:
      IOException - exception
    • removeFromBackupSet

      void removeFromBackupSet(String name, TableName[] tables) throws IOException
      Remove tables from backup set
      Parameters:
      name - name of backup set.
      tables - array of tables to be removed from this set.
      Throws:
      IOException - exception