Restoring HDFS snapshots in Cloudera Manager
Before you restore an HDFS directory from an HDFS snapshot, ensure that there is adequate disk space.
- Go to the tab.
- Go to the directory you want to restore.
- Click the drop-down menu next to the full file path (to the right of the file browser
listings) and select one of the following:
- Restore Directory From Snapshot
- Restore Directory From Snapshot As...
The Restore Snapshot dialog box appears.
- Select Restore Directory From Snapshot As... if you want to restore the snapshot to a different directory. Enter the directory path to which the snapshot has to be restored. Ensure that there is enough space on HDFS to restore the files from the snapshot.
- Select one of the following:
- Use HDFS 'copy' command - This option runs the restore job 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 option runs the restore job
faster 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 policy appear under More Options:
When restoring HDFS data, if a MapReduce or YARN service is present in the cluster, the DistributedCopy (DistCp) job is used to restore directories, increasing the speed of restoration. You can choose MapReduce or YARN as the MapReduce service. For files, if a MapReduce or YARN service is not present, a normal copy is performed.
- Skip Checksum Checks - Determines
whether to skip checksum checks (the default is to perform them). If checked,
checksum validation is not 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.