private void restoreImages(BackupImage[] images, TableName sTable, TableName tTable,
    boolean truncateIfExists, boolean isKeepOriginalSplits) throws IOException {
    // First image MUST be image of a FULL backup
    BackupImage image = images[0];
    String rootDir = image.getRootDir();
    String backupId = image.getBackupId();
    Path backupRoot = new Path(rootDir);
    RestoreTool restoreTool = new RestoreTool(conf, backupRoot, restoreRootDir, backupId);
    Path tableBackupPath = HBackupFileSystem.getTableBackupPath(sTable, backupRoot, backupId);
    String lastIncrBackupId = images.length == 1 ? null : images[images.length - 1].getBackupId();
    // We need hFS only for full restore (see the code)
    BackupManifest manifest = HBackupFileSystem.getManifest(conf, backupRoot, backupId);
    if (manifest.getType() == BackupType.FULL) {
      LOG.info("Restoring '" + sTable + "' to '" + tTable + "' from full" + " backup image "
        + tableBackupPath.toString());
      conf.set(JOB_NAME_CONF_KEY, "Full_Restore-" + backupId + "-" + tTable);
      restoreTool.fullRestoreTable(conn, tableBackupPath, sTable, tTable, truncateIfExists,
        isKeepOriginalSplits, lastIncrBackupId);
      conf.unset(JOB_NAME_CONF_KEY);
    } else { // incremental Backup
      throw new IOException("Unexpected backup type " + image.getType());
    }

    if (images.length == 1) {
      // full backup restore done
      return;
    }

    List<Path> dirList = new ArrayList<>();
    // add full backup path
    // full backup path comes first
    for (int i = 1; i < images.length; i++) {
      BackupImage im = images[i];
      String fileBackupDir =
        HBackupFileSystem.getTableBackupDir(im.getRootDir(), im.getBackupId(), sTable);
      List<Path> list = getFilesRecursively(fileBackupDir);
      dirList.addAll(list);

    }

    if (dirList.isEmpty()) {
      LOG.info("No incremental changes since full backup for '" + sTable
        + "', skipping incremental restore step.");
      return;
    }

    String dirs = StringUtils.join(dirList, ",");
    LOG.info("Restoring '" + sTable + "' to '" + tTable + "' from log dirs: " + dirs);
    Path[] paths = new Path[dirList.size()];
    dirList.toArray(paths);
    conf.set(JOB_NAME_CONF_KEY, "Incremental_Restore-" + backupId + "-" + tTable);
    restoreTool.incrementalRestoreTable(conn, tableBackupPath, paths, new TableName[] { sTable },
      new TableName[] { tTable }, lastIncrBackupId, isKeepOriginalSplits);
    LOG.info(sTable + " has been successfully restored to " + tTable);
  }
Restore operation handle each backupImage in array.
@param images           array BackupImage
@param sTable           table to be restored
@param tTable           table to be restored to
@param truncateIfExists truncate table
@throws IOException exception
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/RestoreTablesClient.java