Backing Up Cloudera Manager
This topic contains procedures to back up Cloudera Manager. Cloudera recommends that you perform these backup steps before upgrading. The backups will allow you to rollback your Cloudera Manager upgrade if needed.
Loading Filters ... 6.3.4 6.3.3 6.3.1 6.3.0 6.2.1 6.2.0 6.1.1 6.1.0 6.0.1 6.0.0 5.16 5.15 5.14 5.13 5.12 5.11 5.10 5.9 5.8 5.7 5.6 5.5 5.4 5.3 5.2 5.1 5.0 6.3.4 6.3.3 6.3.2 6.2.1 6.2.0 6.1.1 6.1.0 6.0.1 6.0.0 5.16 5.15 5.14 5.13 5.12 5.11 5.10 5.9 5.8 5.7 5.6 5.5 5.4 5.3 5.2 5.1 5.0
Continue reading:
- Collect Information
- Back Up Cloudera Manager Agent
- Back Up the Cloudera Management Service
- Back Up Cloudera Navigator Data
- Stop Cloudera Manager Server & Cloudera Management Service
- Back Up the Databases
- Back Up Cloudera Manager Server
- (Optional) Start Cloudera Manager Server & Cloudera Management Service
Collect Information for Backing Up Cloudera Manager
- Log in to the Cloudera Manager Server host.
ssh my_cloudera_manager_server_host
- Collect database information by running the following command:
cat /etc/cloudera-scm-server/db.properties
For example:... com.cloudera.cmf.db.type=... com.cloudera.cmf.db.host=database_hostname:database_port com.cloudera.cmf.db.name=scm com.cloudera.cmf.db.user=scm com.cloudera.cmf.db.password=SOME_PASSWORD
- Collect information (host name, port number, database name, user name and password) for the following databases.
- Reports Manager
- Navigator Audit Server
- Navigator Metadata Server
- Activity Monitor
You can find the database information by using the Cloudera Manager Admin Console. Go to Database category. You may need to contact your database administrator to obtain the passwords.
and select the - Find the host where the Service Monitor, Host Monitor and Event Server roles are running. Go to and note which hosts are running these roles.
- Identify the location of the Cloudera Navigator Metadata Server storage directory:
- Go to .
- Click the Configuration tab.
- Select .
- The Navigator Metadata Server Storage Dir property stores the location of the directory.
- Ensure that Navigator Metadata Server Java heap is large enough to complete the upgrade. You can
estimate the amount of heap needed from the number of elements and relations stored in the Solr storage directory.
- Go to .
- In the list of instances, click Navigator Metadata Server.
- Select .
- Search the log file for solr core nav_elements and note the number of element documents.
- Search the log file for solr core nav_relations and note the number of relation documents.
- Multiply the total number of documents by 200 bytes per document and add to it a baseline of 2 GB:
((num_nav_elements + num_nav_relations) * 200 bytes) + 2 GB
For example, if you had 68813088 elements and 78813930 relations, the recommended Java heap size is ~30 GB:((68813088 + 78813930) * 200) + 2 GB = 29525403600 bytes = ~29.5 GB + 2 GB = ~ 31.5 GB
- Set the heap value in the Java Heap Size of Navigator Metadata Server in Bytes property in .
Back Up Cloudera Manager Agent
Backup up the following Cloudera Manager agent files on all hosts:
- Create a top level backup directory.
export CM_BACKUP_DIR="`date +%F`-CM" echo $CM_BACKUP_DIR mkdir -p $CM_BACKUP_DIR
- Back up the Agent directory and the runtime state.
sudo -E tar -cf $CM_BACKUP_DIR/cloudera-scm-agent.tar --exclude=*.sock /etc/cloudera-scm-agent /etc/default/cloudera-scm-agent /var/run/cloudera-scm-agent /var/lib/cloudera-scm-agent
- Back up the existing repository directory.
- RHEL / CentOS
-
sudo -E tar -cf $CM_BACKUP_DIR/repository.tar /etc/yum.repos.d
- SLES
-
sudo -E tar -cf $CM_BACKUP_DIR/repository.tar /etc/zypp/repos.d
- Debian / Ubuntu
-
sudo -E tar -cf $CM_BACKUP_DIR/repository.tar /etc/apt/sources.list.d
Back Up the Cloudera Management Service
- On the host where the Service Monitor role is configured to run, backup the following directory:
sudo cp -rp /var/lib/cloudera-service-monitor /var/lib/cloudera-service-monitor-`date +%F`-CM
- On the host where the Host Monitor role is configured to run, backup the following directory:
sudo cp -rp /var/lib/cloudera-host-monitor /var/lib/cloudera-host-monitor-`date +%F`-CM
- On the host where the Event Server role is configured to run, back up the following directory:
sudo cp -rp /var/lib/cloudera-scm-eventserver /var/lib/cloudera-scm-eventserver-`date +%F`-CM
Stop Cloudera Manager Server & Cloudera Management Service
- Stop the Cloudera Management Service.
- Log in to the Cloudera Manager Admin Console.
- Select .
- Select .
- Log in to the Cloudera Manager Server host.
ssh my_cloudera_manager_server_host
- Stop the Cloudera Manager Server.
- RHEL 7, SLES 12, Debian 8, Ubuntu 16.04 and higher
-
sudo systemctl stop cloudera-scm-server
- RHEL 5 or 6, SLES 11, Debian 6 or 7, Ubuntu 12.04 or 14.04
-
sudo service cloudera-scm-server stop
Back Up the Cloudera Manager Databases
- Back up the Cloudera Manager server database – Run the following command. (The command displayed below depends on the database you selected in the
form at the top of this page. Replace placeholders with the actual values returned from the db.properties file):
- MySQL
-
mysqldump --databases database_name --host=database_hostname --port=database_port -u user_name -p > $HOME/database_name-backup-`date +%F`-CM.sql
- Oracle
- Work with your database administrator to ensure databases are properly backed up.
For more information about backing up databases, see Backing Up Databases.
- Back up All other Cloudera Manager databases - Use the database information that you
collected in a previous step. You may need to contact your database administrator to obtain the passwords.
These databases can include the following:
- Reports Manager
- Navigator Audit Server
- Navigator Metadata Server
- Activity Monitor (Only used for MapReduce 1 monitoring).
Run the following commands to back up the databases. (The command displayed below depends on the database you selected in the form at the top of this page. Replace placeholders with the actual values.):
- MySQL
-
mysqldump --databases database_name --host=database_hostname --port=database_port -u database_username -p > $HOME/database_name-backup-`date +%F`-CM.sql
- Oracle
- Work with your database administrator to ensure databases are properly backed up.
Back Up Cloudera Manager Server
- Log in to the Cloudera Manager Server host.
ssh my_cloudera_manager_server_host
- Create a top-level backup directory.
export CM_BACKUP_DIR="`date +%F`-CM" echo $CM_BACKUP_DIR mkdir -p $CM_BACKUP_DIR
- Back up the Cloudera Manager Server directories:
sudo -E tar -cf $CM_BACKUP_DIR/cloudera-scm-server.tar /etc/cloudera-scm-server /etc/default/cloudera-scm-server
- Back up the existing repository directory.
- RHEL / CentOS
-
sudo -E tar -cf $CM_BACKUP_DIR/repository.tar /etc/yum.repos.d
- SLES
-
sudo -E tar -cf $CM_BACKUP_DIR/repository.tar /etc/zypp/repos.d
- Debian / Ubuntu
-
sudo -E tar -cf $CM_BACKUP_DIR/repository.tar /etc/apt/sources.list.d
(Optional) Start Cloudera Manager Server & Cloudera Management Service
Start the Cloudera Manager server and Cloudera Manager Management service.
If you will be immediately upgrading Cloudera Manager, skip this step and continue with Upgrading the Cloudera Manager Server.
- Log in to the Cloudera Manager Server host.
ssh my_cloudera_manager_server_host
- Start the Cloudera Manager Server.
- RHEL 7, SLES 12, Debian 8, Ubuntu 16.04 and higher
-
sudo systemctl start cloudera-scm-server
If the Cloudera Manager Server starts without errors, no response displays. - RHEL 5 or 6, SLES 11, Debian 6 or 7, Ubuntu 12.04 or 14.04
-
sudo service cloudera-scm-server start
You should see the following:Starting cloudera-scm-server: [ OK ]
- Start the Cloudera Management Service.
- Log in to the Cloudera Manager Admin Console.
- Select .
- Select .