title: How to take namenode backup
body: <p>I have a hadoop cluster with 6 datanode and 1 namenode. But I do not have any standby namenode or journal node. I know this is not a good practice but due to some constraints I have to continue with this for the time being. </p>
  
  <p>Can any one tell me , how can I take backup of my namenode metadata manually? I have taken backup of fsimage by this command </p>
  
  <pre><code>hdfs dfsadmin -fetchImage someFilename
  </code></pre>
  
  <p>But is this all I have to do? or I have to take a copy of <strong>dfs.namenode.name.dir directory</strong> also. </p>
  
  <p>If fsimage  is only thing, how can we restore the fsimage if my existing namenode goes down for hardware issue. </p>
  
  <p>If I have the copy of <strong>dfs.namenode.name.dir</strong> directory and fsimage , in that case also , how can I use those for restore purpose? </p>
  
  <p>Please let me know if any one knows process to take backup and restore of namenode metadata manually.</p>
  
  <p>Thanks in advance.... </p>