To save the HDFS namepsace:
Place the NameNode in safe mode, to keep HDFS from accepting any new writes:
hadoop dfsadmin -safemode enter
Save the namespace.
hadoop dfsadmin -saveNamespace
![[Note]](../common/images/admon/note.png)
Note Do NOT leave safe mode from this point onwards. HDFS should not accept any new writes.
On the machine that hosts the NameNode, copy the following checkpoint directories into a backup directory:
<HDP data directory>/hdfs/nn/edits/current <HDP data directory>/hdfs/nn/edits/image <HDP data directory>/hdfs/nn/edits/previous.checkpoint

