Created on 10-08-2016 04:18 PM
The operations described in this section require superuser privileges.
hadoop dfsadmin -allowSnapshot $path
hadoop dfsadmin -disallowSnapshot $path
The section describes user operations. Note that HDFS superuser can perform all the operations without satisfying the permission requirement in the individual operations.
hadoop dfs -createSnapshot $path $snapshotName
path | The path of the snapshottable directory. |
snapshotName | The snapshot name, which is an optional argument. When it is omitted, a default name is generated using a timestamp with the format "'s'yyyyMMdd-HHmmss.SSS", e.g. "s20130412-151029.033". |
hadoop dfs -deleteSnapshot $path $snapshotName
path | The path of the snapshottable directory. |
snapshotName | The snapshot name. |
hadoop dfs -renameSnapshot $path $oldName $newName
path | The path of the snapshottable directory. |
oldName | The old snapshot name. |
newName | The new snapshot name. |
hadoop lsSnapshottableDir $path $snapshotName
path | The path of the snapshottable directory. |
snapshotName | The snapshot name. |
hadoop snapshotDiff $path $fromSnapshot $toSnapshot
path | The path of the snapshottable directory. |
fromSnapshot | The name of the starting snapshot. |
toSnapshot | The name of the ending snapshot. |