@InterfaceAudience.Public @InterfaceStability.Evolving public interface BackupAdmin extends Closeable
Admin.getBackupAdmin() and call Closeable.close() afterwards.
BackupAdmin can be used to create backups, restore data from backups and for other backup-related operations.
Admin| Modifier and Type | Method and Description |
|---|---|
void |
addToBackupSet(String name,
TableName[] tables)
Add tables to backup set command
|
String |
backupTables(BackupRequest userRequest)
Backs up given list of tables fully.
|
Future<String> |
backupTablesAsync(BackupRequest userRequest)
Backs up given list of tables fully.
|
int |
deleteBackups(String[] backupIds)
Delete backup image command
|
boolean |
deleteBackupSet(String name)
Delete backup set command
|
BackupInfo |
getBackupInfo(String backupId)
Describe backup image command
|
BackupSet |
getBackupSet(String name)
Backup set describe command.
|
List<BackupInfo> |
getHistory(int n)
Show backup history command
|
int |
getProgress(String backupId)
Show backup progress command
|
List<BackupSet> |
listBackupSets()
Backup sets list command - list all backup sets.
|
void |
removeFromBackupSet(String name,
String[] tables)
Remove tables from backup set
|
void |
restore(RestoreRequest request)
Restore backup
|
String backupTables(BackupRequest userRequest) throws IOException
request - BackupRequest instance which contains the following members:
type whether the backup is full or incremental
tableList list of tables to backup
targetRootDir root directory for saving the backup
workers number of parallel workers. -1 - system defined
bandwidth bandwidth per worker in MB per second. -1 - unlimitedIOExceptionFuture<String> backupTablesAsync(BackupRequest userRequest) throws IOException
request - BackupRequest instance which contains the following members:
type whether the backup is full or incremental
tableList list of tables to backup
targetRootDir root dir for saving the backup
workers number of paralle workers. -1 - system defined
bandwidth bandwidth per worker in MB per sec. -1 - unlimitedIOExceptionBackupInfo getBackupInfo(String backupId) throws IOException
backupId - - backup idIOException - exceptionint getProgress(String backupId) throws IOException
backupId - - backup id (may be null)IOException - exceptionint deleteBackups(String[] backupIds) throws IOException
backupIds - - backup idIOException - exceptionList<BackupInfo> getHistory(int n) throws IOException
n - - last n backup sessionsIOException - exceptionList<BackupSet> listBackupSets() throws IOException
IOException - exceptionBackupSet getBackupSet(String name) throws IOException
name - set nameIOException - exceptionboolean deleteBackupSet(String name) throws IOException
name - - backup set nameIOException - exceptionvoid addToBackupSet(String name, TableName[] tables) throws IOException
name - - name of backup set.tables - - list of tables to be added to this set.IOException - exceptionvoid removeFromBackupSet(String name, String[] tables) throws IOException
name - - name of backup set.tables - - list of tables to be removed from this set.IOException - exceptionvoid restore(RestoreRequest request) throws IOException
request - - restore requestIOException - exception