@InterfaceAudience.Private @InterfaceStability.Evolving public class HBaseBackupAdmin extends Object implements BackupAdmin
Admin.getBackupAdmin() and call 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.
|
void |
close() |
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
|
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic BackupInfo getBackupInfo(String backupId) throws IOException
BackupAdmingetBackupInfo in interface BackupAdminbackupId - - backup idIOException - exceptionpublic int getProgress(String backupId) throws IOException
BackupAdmingetProgress in interface BackupAdminbackupId - - backup id (may be null)IOException - exceptionpublic int deleteBackups(String[] backupIds) throws IOException
BackupAdmindeleteBackups in interface BackupAdminbackupIds - - backup idIOException - exceptionpublic List<BackupInfo> getHistory(int n) throws IOException
BackupAdmingetHistory in interface BackupAdminn - - last n backup sessionsIOException - exceptionpublic List<BackupSet> listBackupSets() throws IOException
BackupAdminlistBackupSets in interface BackupAdminIOException - exceptionpublic BackupSet getBackupSet(String name) throws IOException
BackupAdmingetBackupSet in interface BackupAdminname - set nameIOException - exceptionpublic boolean deleteBackupSet(String name) throws IOException
BackupAdmindeleteBackupSet in interface BackupAdminname - - backup set nameIOException - exceptionpublic void addToBackupSet(String name, TableName[] tables) throws IOException
BackupAdminaddToBackupSet in interface BackupAdminname - - name of backup set.tables - - list of tables to be added to this set.IOException - exceptionpublic void removeFromBackupSet(String name, String[] tables) throws IOException
BackupAdminremoveFromBackupSet in interface BackupAdminname - - name of backup set.tables - - list of tables to be removed from this set.IOException - exceptionpublic void restore(RestoreRequest request) throws IOException
BackupAdminrestore in interface BackupAdminrequest - - restore requestIOException - exceptionpublic String backupTables(BackupRequest userRequest) throws IOException
BackupAdminbackupTables in interface BackupAdminIOExceptionpublic Future<String> backupTablesAsync(BackupRequest userRequest) throws IOException
BackupAdminbackupTablesAsync in interface BackupAdminIOException