Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Why to stop Namenode services to taker Metadata backup ?

Solved Go to solution

Why to stop Namenode services to taker Metadata backup ?

Explorer

Hi Team,

Good Morning!

 

why to stop Namenode services to take backup of namenode metadata, instead of stoping namenode services we can put namenode in safe mode  "ON" mode right so that cluster will get read-only state and take the backup using #tar -cvf backname metadatapath

 

i am using Cloudera distribution 

in below url i found to stop servies and proceed to take the backup.. why not with safe mode option  ?? please help me

https://www.cloudera.com/documentation/enterprise/5-4-x/topics/cm_mc_hdfs_metadata_backup.html

 

Thanks

Balaji Vemula

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Why to stop Namenode services to taker Metadata backup ?

Champion

@balajivsn

 

 

you can stop the cluster using CM -> Top left Cluster menu -> Stop


Yes, It will stop all the avilable services Ex: Hue, Hive, Spark, Flume, Yarn, HDFS, Zookeeper, etc. And it won't disturb your host & Cloudera Management Service.

 

Note: You don't need to separately handle daemons like namenode on this 

Re: Why to stop Namenode services to taker Metadata backup ?

Champion

yes this will stop all the service like hive impala spark kudu oozie solr etc 

sqoop however is a client tool.

Hope this is suffice . 

7 REPLIES 7

Re: Why to stop Namenode services to taker Metadata backup ?

Champion

You can perform the below without stopping the namenode .

 

hdfs dfsadmin -fetchImage 

Moreover its good to have HA configured to avoid single point of failure.

I will provide a good link that talks more about the metadata Backup ,its really good blog.

http://vijayjt.blogspot.in/2013/02/hdfs-file-system-metadata-backup.html

Re: Why to stop Namenode services to taker Metadata backup ?

Champion

@balajivsn

 

The link that you are referring is belongs to 5.4.x, please refer the below link (5.14.x) for little more details

 

There are two types of backup

1. HDFS Metadata backup

https://www.cloudera.com/documentation/enterprise/5-14-x/topics/cm_mc_hdfs_metadata_backup.html

 

Need to follow all the steps including "Stop the cluster. It is particularly important that the NameNode role process is not running so that you can make a consistent backup" 

 

2. NameNode Metadata backup

https://www.cloudera.com/documentation/enterprise/5-14-x/topics/cm_mc_nn_metadata_backup.html

 

can be done using 

$ hdfs dfsadmin -fetchImage backup_dir 

 

Now to answer your question,

If you see the first link, it says "Cloudera recommends backing up HDFS metadata before a major upgrade". So In the real-time production cluster, we perform the HDFS metadata backup, major upgrade during the downtime. So the given steps are recommended way for consistent backup.

 

But if your situation is just a mater of namenode back-up in a regular interval, then I belive you are correct.. you can switch-on the safe mode and take a backup and leave the safe mode. (or) you can try the option from the 2nd link

 

Note: Please make sure to test it in lower environments before apply in prod

Re: Why to stop Namenode services to taker Metadata backup ?

Explorer

Thanks for your response

 

so Stop cluster means - it will stop all the components right(include bothe namenodes and other components like soop, hive, yarn etc....) ? if i am not wrong...

 

 

Re: Why to stop Namenode services to taker Metadata backup ?

Champion

@balajivsn

 

 

you can stop the cluster using CM -> Top left Cluster menu -> Stop


Yes, It will stop all the avilable services Ex: Hue, Hive, Spark, Flume, Yarn, HDFS, Zookeeper, etc. And it won't disturb your host & Cloudera Management Service.

 

Note: You don't need to separately handle daemons like namenode on this 

Re: Why to stop Namenode services to taker Metadata backup ?

Explorer

Thanks for your support

Re: Why to stop Namenode services to taker Metadata backup ?

Champion

yes this will stop all the service like hive impala spark kudu oozie solr etc 

sqoop however is a client tool.

Hope this is suffice . 

Re: Why to stop Namenode services to taker Metadata backup ?

Explorer

Thank you for your support