Restore HDFS metadata from a backup using Cloudera Manager
When both the NameNode hosts have failed, you can use Cloudera Manager to restore HDFS metadata.
- Remove the NameNode, JournalNode, and Failover Controller roles from the HDFS service.
- Add the host on which the NameNode role will run.
- Create the NameNode data directory, ensuring that the permissions, ownership, and group are set correctly.
- Copy the backed up files to the NameNode data directory.
- Add the NameNode role to the host.
- Add the Secondary NameNode role to another host.
Enable high availability.
If not all roles are started after the wizard completes, restart the HDFS service. Upon startup, the NameNode reads the fsimage file and loads it into memory. If the JournalNodes are up and running and there are edit files present, any edits newer than the fsimage are applied.