As an administrator, you can enable or disable snapshot creation on a directory.
These operations require the superuser privilege. As a user; you can create, delete, or
rename snapshots on a directory that has snapshot creation enabled. These operations require
either the superuser privilege or the owner privilege on the directory.
User OperationsThe following table lists
the user operations that you can perform on snapshots:
For more information about these commands, see https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsSnapshots.html#User_Operations.
hdfs dfs -createSnapshot <path>
hdfs dfs -deleteSnapshot <path>
hdfs dfs -renameSnapshot <path> <oldName>
|List directories on which snapshot creation is enabled
|List differences between contents of snapshots
hdfs snapshotDiff <path> <fromSnapshot>