@InterfaceAudience.Public @InterfaceStability.Evolving public interface BackupAdmin extends java.io.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(java.lang.String name,
TableName[] tables)
Add tables to backup set command
|
java.lang.String |
backupTables(BackupRequest userRequest)
Backs up given list of tables fully.
|
java.util.concurrent.Future<java.lang.String> |
backupTablesAsync(BackupRequest userRequest)
Backs up given list of tables fully.
|
int |
deleteBackups(java.lang.String[] backupIds)
Delete backup image command
|
boolean |
deleteBackupSet(java.lang.String name)
Delete backup set command
|
BackupInfo |
getBackupInfo(java.lang.String backupId)
Describe backup image command
|
BackupSet |
getBackupSet(java.lang.String name)
Backup set describe command.
|
java.util.List<BackupInfo> |
getHistory(int n)
Show backup history command
|
int |
getProgress(java.lang.String backupId)
Show backup progress command
|
java.util.List<BackupSet> |
listBackupSets()
Backup sets list command - list all backup sets.
|
void |
removeFromBackupSet(java.lang.String name,
java.lang.String[] tables)
Remove tables from backup set
|
void |
restore(RestoreRequest request)
Restore backup
|
java.lang.String backupTables(BackupRequest userRequest) throws java.io.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 - unlimitedjava.io.IOExceptionjava.util.concurrent.Future<java.lang.String> backupTablesAsync(BackupRequest userRequest) throws java.io.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 - unlimitedjava.io.IOExceptionBackupInfo getBackupInfo(java.lang.String backupId) throws java.io.IOException
backupId - - backup idjava.io.IOException - exceptionint getProgress(java.lang.String backupId)
throws java.io.IOException
backupId - - backup id (may be null)java.io.IOException - exceptionint deleteBackups(java.lang.String[] backupIds)
throws java.io.IOException
backupIds - - backup idjava.io.IOException - exceptionjava.util.List<BackupInfo> getHistory(int n) throws java.io.IOException
n - - last n backup sessionsjava.io.IOException - exceptionjava.util.List<BackupSet> listBackupSets() throws java.io.IOException
java.io.IOException - exceptionBackupSet getBackupSet(java.lang.String name) throws java.io.IOException
name - set namejava.io.IOException - exceptionboolean deleteBackupSet(java.lang.String name)
throws java.io.IOException
name - - backup set namejava.io.IOException - exceptionvoid addToBackupSet(java.lang.String name,
TableName[] tables)
throws java.io.IOException
name - - name of backup set.tables - - list of tables to be added to this set.java.io.IOException - exceptionvoid removeFromBackupSet(java.lang.String name,
java.lang.String[] tables)
throws java.io.IOException
name - - name of backup set.tables - - list of tables to be removed from this set.java.io.IOException - exceptionvoid restore(RestoreRequest request) throws java.io.IOException
request - - restore requestjava.io.IOException - exception