This is the documentation for Cloudera Manager 5.1.x. Documentation for other versions is available at Cloudera Documentation.

Backing Up HDFS Metadata

  Note:
  • Cloudera recommends backing up HDFS metadata on a regular basis, as well as before a major upgrade.
  • Before backing up, Stop the cluster. It is particularly important that the NameNode role process is not running so that you can make a consistent backup.
  1. Stop the NameNode you want to back up.
  2. Go to the HDFS service.
  3. Click the Configuration tab.
  4. In the Search field, search for "NameNode Data Directories". This locates the NameNode Data Directories property.
  5. From the command line on the NameNode host, back up the directory listed in the NameNode Data Directories property. If more than one is listed, then you only need to make a backup of one directory, since each directory is a complete copy. For example, if the data directory is /mnt/hadoop/hdfs/name, do the following as root:
    # cd /mnt/hadoop/hdfs/name
    # tar -cvf /root/nn_backup_data.tar .

    You should see output like this:

    ./
    ./current/
    ./current/fsimage
    ./current/fstime
    ./current/VERSION
    ./current/edits
    ./image/
    ./image/fsimage
      Warning: If you see a file containing the word lock, the NameNode is probably still running. Repeat the preceding steps, starting by shutting down the CDH services.
Page generated September 3, 2015.