/** * Check whether the backup image path and there is manifest file in the path. * @param backupManifestMap If all the manifests are found, then they are put into this map * @param tableArray the tables involved * @throws IOException exception */ public static void checkImageManifestExist(HashMap<TableName, BackupManifest> backupManifestMap, TableName[] tableArray, Configuration conf, Path backupRootPath, String backupId) throws IOException { for (TableName tableName : tableArray) { BackupManifest manifest = getManifest(conf, backupRootPath, backupId); backupManifestMap.put(tableName, manifest); } } }
protected void updateBackupManifest(String backupRoot, String mergedBackupId, List<String> backupsToDelete) throws IllegalArgumentException, IOException { BackupManifest manifest = HBackupFileSystem.getManifest(conf, new Path(backupRoot), mergedBackupId); manifest.getBackupImage().removeAncestors(backupsToDelete); // save back manifest.store(conf); }
String lastIncrBackupId = images.length == 1 ? null : images[images.length - 1].getBackupId(); BackupManifest manifest = HBackupFileSystem.getManifest(conf, backupRoot, backupId); if (manifest.getType() == BackupType.FULL) { LOG.info("Restoring '" + sTable + "' to '" + tTable + "' from full" + " backup image "