hdfs dfsadmin -createSnapshot /path snapshot_name
hdfs dfs -listSnapshots /path
hdfs dfs -restoreSnapshot /path snapshot_name
hadoop distcp source_path destination_path
hdfs dfs -get /hdfs_path /local_path
,恢復時用hdfs dfs -put /local_path /hdfs_path
hadoop 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]