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 operations🔗
The following table lists
the user operations that you can perform on snapshots:
Operation |
Command |
Create snapshots |
hdfs dfs -createSnapshot <path>
[<snapshotName>] |
Delete snapshots |
hdfs dfs -deleteSnapshot <path>
<snapshotName> |
Rename snapshots |
hdfs dfs -renameSnapshot <path> <oldName>
<newName> |
List directories on which snapshot creation is enabled
(snapshottable directories) |
hdfs lsSnapshottableDir |
List differences between contents of snapshots |
hdfs snapshotDiff <path> <fromSnapshot>
<toSnapshot> |
For more information about these commands, see https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsSnapshots.html#User_Operations.