@Test
  public void testFullBackupRemote() throws Exception {
    LOG.info("test remote full backup on a single table");
    final CountDownLatch latch = new CountDownLatch(1);
    final int NB_ROWS_IN_FAM3 = 6;
    final byte[] fam3Name = Bytes.toBytes("f3");
    final byte[] fam2Name = Bytes.toBytes("f2");
    final Connection conn = ConnectionFactory.createConnection(conf1);
    Thread t = new Thread(() -> {
      try {
        latch.await();
      } catch (InterruptedException ie) {
      }
      try {
        Table t1 = conn.getTable(table1);
        Put p1;
        for (int i = 0; i < NB_ROWS_IN_FAM3; i++) {
          p1 = new Put(Bytes.toBytes("row-t1" + i));
          p1.addColumn(fam3Name, qualName, Bytes.toBytes("val" + i));
          t1.put(p1);
        }
        LOG.debug("Wrote " + NB_ROWS_IN_FAM3 + " rows into family3");
        t1.close();
      } catch (IOException ioe) {
        throw new RuntimeException(ioe);
      }
    });
    t.start();
    // family 2 is MOB enabled
    TableDescriptor newTable1Desc = TableDescriptorBuilder.newBuilder(table1Desc)
      .setColumnFamily(ColumnFamilyDescriptorBuilder.of(fam3Name))
      .setColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(fam2Name).setMobEnabled(true)
        .setMobThreshold(0L).build())
      .build();
    TEST_UTIL.getAdmin().modifyTable(newTable1Desc);

    SnapshotTestingUtils.loadData(TEST_UTIL, table1, 50, fam2Name);
    Table t1 = conn.getTable(table1);
    int rows0 = MobSnapshotTestingUtils.countMobRows(t1, fam2Name);

    latch.countDown();
    String backupId =
      backupTables(BackupType.FULL, Lists.newArrayList(table1), BACKUP_REMOTE_ROOT_DIR);
    assertTrue(checkSucceeded(backupId));

    LOG.info("backup complete " + backupId);
    Assert.assertEquals(TEST_UTIL.countRows(t1, famName), NB_ROWS_IN_BATCH);

    t.join();
    Assert.assertEquals(TEST_UTIL.countRows(t1, fam3Name), NB_ROWS_IN_FAM3);
    t1.close();

    TableName[] tablesRestoreFull = new TableName[] { table1 };

    TableName[] tablesMapFull = new TableName[] { table1_restore };

    BackupAdmin client = getBackupAdmin();
    client.restore(BackupUtils.createRestoreRequest(BACKUP_REMOTE_ROOT_DIR, backupId, false,
      tablesRestoreFull, tablesMapFull, false));

    // check tables for full restore
    Admin hAdmin = TEST_UTIL.getAdmin();
    assertTrue(hAdmin.tableExists(table1_restore));

    // #5.2 - checking row count of tables for full restore
    Table hTable = conn.getTable(table1_restore);
    Assert.assertEquals(TEST_UTIL.countRows(hTable, famName), NB_ROWS_IN_BATCH);
    int cnt3 = TEST_UTIL.countRows(hTable, fam3Name);
    Assert.assertTrue(cnt3 >= 0 && cnt3 <= NB_ROWS_IN_FAM3);

    int rows1 = MobSnapshotTestingUtils.countMobRows(t1, fam2Name);
    Assert.assertEquals(rows0, rows1);
    hTable.close();

    hAdmin.close();
  }
Verify that a remote full backup is created on a single table with data correctly.
@throws Exception if an operation on the table fails
hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestRemoteBackup.java