Backing up NameNode metadata
You must back up the VERSION file and then back up the NameNode metadata.
Make a single backup of the VERSION file.
This does not need to be backed up regularly as it does not change, but it is important since it contains the clusterID, along with other details.
Use the following command to back up the NameNode metadata.
It automatically determines the active NameNode, retrieves the current fsimage, and places it in the defined backup_dir.
hdfs dfsadmin -fetchImage backup_dir
fsimagefile and commits it to memory. If the JournalNodes are up and running, and there are edit files present, any edits newer than the
fsimageare also applied. If the JournalNodes are unavailable, it is possible to lose any data transferred in the interim.