@InterfaceAudience.Private @InterfaceStability.Evolving public class HBaseBackupAdmin extends java.lang.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(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.
|
void |
close() |
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
|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic BackupInfo getBackupInfo(java.lang.String backupId) throws java.io.IOException
BackupAdmingetBackupInfo in interface BackupAdminbackupId - - backup idjava.io.IOException - exceptionpublic int getProgress(java.lang.String backupId)
throws java.io.IOException
BackupAdmingetProgress in interface BackupAdminbackupId - - backup id (may be null)java.io.IOException - exceptionpublic int deleteBackups(java.lang.String[] backupIds)
throws java.io.IOException
BackupAdmindeleteBackups in interface BackupAdminbackupIds - - backup idjava.io.IOException - exceptionpublic java.util.List<BackupInfo> getHistory(int n) throws java.io.IOException
BackupAdmingetHistory in interface BackupAdminn - - last n backup sessionsjava.io.IOException - exceptionpublic java.util.List<BackupSet> listBackupSets() throws java.io.IOException
BackupAdminlistBackupSets in interface BackupAdminjava.io.IOException - exceptionpublic BackupSet getBackupSet(java.lang.String name) throws java.io.IOException
BackupAdmingetBackupSet in interface BackupAdminname - set namejava.io.IOException - exceptionpublic boolean deleteBackupSet(java.lang.String name)
throws java.io.IOException
BackupAdmindeleteBackupSet in interface BackupAdminname - - backup set namejava.io.IOException - exceptionpublic void addToBackupSet(java.lang.String name,
TableName[] tables)
throws java.io.IOException
BackupAdminaddToBackupSet in interface BackupAdminname - - name of backup set.tables - - list of tables to be added to this set.java.io.IOException - exceptionpublic void removeFromBackupSet(java.lang.String name,
java.lang.String[] tables)
throws java.io.IOException
BackupAdminremoveFromBackupSet in interface BackupAdminname - - name of backup set.tables - - list of tables to be removed from this set.java.io.IOException - exceptionpublic void restore(RestoreRequest request) throws java.io.IOException
BackupAdminrestore in interface BackupAdminrequest - - restore requestjava.io.IOException - exceptionpublic java.lang.String backupTables(BackupRequest userRequest) throws java.io.IOException
BackupAdminbackupTables in interface BackupAdminjava.io.IOExceptionpublic java.util.concurrent.Future<java.lang.String> backupTablesAsync(BackupRequest userRequest) throws java.io.IOException
BackupAdminbackupTablesAsync in interface BackupAdminjava.io.IOException