Chapter 4. User Guide - HDFS Snapshots

HDFS Snapshots are read-only point-in-time copies of the file system. Snapshots can be taken on a subtree of the file system or the entire file system. Some common use cases of snapshots are data backup, protection against user errors and disaster recovery.

The implementation of HDFS Snapshots is efficient:

  1. Snapshot creation is instantaneous: the cost is O(1) excluding the inode lookup time.

  2. Additional memory is used only when modifications are made relative to a snapshot: memory usage is O(M) where M is the number of modified files/directories.

  3. Blocks in datanodes are not copied: the snapshot files record the block list and the file size. There is no data copying.

  4. Snapshots do not adversely affect regular HDFS operations: modifications are recorded in reverse chronological order so that the current data can be accessed directly. The snapshot data is computed by subtracting the modifications from the current data.

In this document: