@Test
  public void testFullRestoreSingleOverwriteCommand() throws Exception {
    LOG.info("test full restore on a single table empty table: command-line");
    List<TableName> tables = Lists.newArrayList(table1);
    String backupId = fullTableBackup(tables);
    assertTrue(checkSucceeded(backupId));
    LOG.info("backup complete");
    TableName[] tableset = new TableName[] { table1 };
    // restore <backup_root_path> <backup_id> <tables> [tableMapping]
    String[] args =
      new String[] { BACKUP_ROOT_DIR, backupId, "-t", StringUtils.join(tableset, ","), "-o" };
    // Run restore
    int ret = ToolRunner.run(conf1, new RestoreDriver(), args);
    assertTrue(ret == 0);

    Admin hba = TEST_UTIL.getAdmin();
    assertTrue(hba.tableExists(table1));
    hba.close();
  }
Verify that a single table is restored using overwrite.
@throws Exception if doing the backup or an operation on the tables fails
hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestFullRestore.java