Restoring Snapshots

Before you restore from a snapshot, ensure that there is adequate disk space.

  1. From the Clusters tab, select your CDH HDFS service.
  2. Go to the File Browser tab.
  3. Go to the directory you want to restore.
  4. 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 following:
    • Restore Directory From Snapshot
    • Restore Directory From Snapshot As...

    The Restore Snapshot screen displays.

  5. 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.
  6. 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 Options:
      • 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.