Enable snapshot creation on a directory
You must enable snapshot creation on a directory before creating snapshots on that directory. If the snapshot creation is enabled, the directory becomes snapshottable.
- You can perform this task only if you have the superuser privilege.
- You cannot enable snapshot creation on any directory if its parent or child directory is already enabled for snapshot creation.
hdfs dfsadmincommand with the
-allowSnapshotoption and specify the directory on which you want to enable snapshot creation.
The following example shows how you can enable snapshot creation for the directory
hdfs dfsadmin -allowSnapshot /data/dir1
If snapshot creation is successfully enabled on the specified directory, a confirmation message appears.
Allowing snapshot on /data/dir1 succeeded