public static boolean validate(List<TableName> tables, BackupManifest backupManifest,
    Configuration conf) throws IOException {
    boolean isValid = true;

    for (TableName table : tables) {
      TreeSet<BackupImage> imageSet = new TreeSet<>();

      ArrayList<BackupImage> depList = backupManifest.getDependentListByTable(table);
      if (depList != null && !depList.isEmpty()) {
        imageSet.addAll(depList);
      }

      LOG.info("Dependent image(s) from old to new:");
      for (BackupImage image : imageSet) {
        String imageDir =
          HBackupFileSystem.getTableBackupDir(image.getRootDir(), image.getBackupId(), table);
        if (!BackupUtils.checkPathExist(imageDir, conf)) {
          LOG.error("ERROR: backup image does not exist: " + imageDir);
          isValid = false;
          break;
        }
        LOG.info("Backup image: " + image.getBackupId() + " for '" + table + "' is available");
      }
    }
    return isValid;
  }
Create restore request.
@param backupRootDir backup root dir
@param backupId      backup id
@param check         check only
@param fromTables    table list from
@param toTables      table list to
@param isOverwrite   overwrite data
@return request obkect
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java