hdfs dfsadmin -createSnapshot /path snapshot_namehdfs dfs -listSnapshots /pathhdfs dfs -restoreSnapshot /path snapshot_namehadoop distcp source_path destination_pathhdfs dfs -get /hdfs_path /local_path,恢复时用hdfs dfs -put /local_path /hdfs_pathhadoop archive -archiveName name.har -p /source_path /dest_path.Trash目录恢复误删文件:hdfs dfs -mv /user/.Trash/Current/file /original_path注意:操作前确保集群正常运行,优先在测试环境验证备份恢复流程。
参考来源:[1,2,3,4,5,6,7,8,10,11]