@Test
  public void testBackupDeleteRestore() throws Exception {
    LOG.info("test full restore on a single table empty table");

    List<TableName> tables = Lists.newArrayList(table1);
    String backupId = fullTableBackup(tables);
    assertTrue(checkSucceeded(backupId));
    LOG.info("backup complete");
    int numRows = TEST_UTIL.countRows(table1);
    Admin hba = TEST_UTIL.getAdmin();
    // delete row
    try (Table table = TEST_UTIL.getConnection().getTable(table1)) {
      Delete delete = new Delete(Bytes.toBytes("row0"));
      table.delete(delete);
      hba.flush(table1);
    }

    TableName[] tableset = new TableName[] { table1 };
    TableName[] tablemap = null;// new TableName[] { table1_restore };
    BackupAdmin client = getBackupAdmin();
    client.restore(
      BackupUtils.createRestoreRequest(BACKUP_ROOT_DIR, backupId, false, tableset, tablemap, true));

    int numRowsAfterRestore = TEST_UTIL.countRows(table1);
    assertEquals(numRows, numRowsAfterRestore);
    hba.close();
  }
Verify that load data- backup - delete some data - restore works as expected - deleted data get
restored.
@throws Exception if doing the backup or an operation on the tables fails
hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupDeleteRestore.java