Before you restore from a snapshot, ensure that there is adequate disk space.
- From the Clusters tab, select your CDH HDFS service.
- Go to the File Browser tab.
- Go to the directory you want to restore.
- In the File Browser, click the drop-down menu next to the full file
path (to the right of the file browser listings) and select one of the
- Restore Directory From Snapshot
- Restore Directory From Snapshot As...
The Restore Snapshot screen displays.
- If you selected Restore Directory From Snapshot As..., enter the username to apply when restoring the snapshot.
- Select one of the following:
- Use HDFS 'copy' command - This option executes more slowly and does not require credentials in a secure cluster. It copies the contents of the snapshot as a subdirectory or as files within the target directory.
- Use DistCp / MapReduce - This options
executes more quickly and requires credentials (Run As) in secure
clusters. It merges the target directory with the contents of the
source snapshot. When you select this option, the following
additional fields, which are similar to those available when
configuring a replication, display under More
When restoring HDFS data, if a MapReduce or YARN service is present in the cluster, DistributedCopy (distcp) is used to restore directories, increasing the speed of restoration. The Restore Snapshots screen HDFS (under More Options) allows selection of either MapReduce or YARN as the MapReduce service. For files, or if a MapReduce or YARN service is not present, a normal copy is performed.
- Skip Checksum Checks - Whether to
skip checksum checks (the default is to perform them). If checked, checksum
validation will not be performed. You must select the this property to prevent failure when restoring snapshots in the following cases:
- Restoring a snapshot within a single encryption zone.
- Restoring a snapshot from one encryption zone to a different encryption zone.
- Restoring a snapshot from an unencrypted zone to an encrypted zone.