To save the HDFS namepsace:
Open the command prompt using the Hadoop user account and go to the Hadoop home directory:
runas /user:hadoop "cmd /K cd %HADOOP_HOME%"
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 Do NOT leave safe mode from this point onwards. HDFS should not accept any new writes.
Finalize the namespace:
hadoop namenode -finalize
On the machine that hosts the NameNode, copy the following checkpoint directories into a backup directory:
%HADOOP_HDFS_HOME%\hdfs\nn\edits\current %HADOOP_HDFS_HOME%\hdfs\nn\edits\image %HADOOP_HDFS_HOME%\hdfs\nn\edits\previous.checkpoint