Back Up the Cloudera Manager Databases

Loading Filters ... 7.7.1 7.6.7 7.6.1 7.5.1 7.4.4 7.3.1 7.2.4 7.1.4 7.1.3 7.1.2 7.1.1 7.0.3 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 6.3.4 6.3.3 6.3.2 6.3.1 6.3.0 6.2.1 6.2.0 6.1.1 6.1.0 6.0.2 6.0.1 7.1.8 7.1.7.1000 7.1.7 7.1.6 7.1.5 7.1.4 7.1.3 7.1.2 7.1.1 7.1.7.2000 7.7.1 7.6.7 7.6.1 7.5.1 7.4.4 7.4.3 7.3.1 7.2.4 7.1.4 7.1.3 7.1.2 7.1.1

  1. Back up the Cloudera Manager server database – Run the following command. Replace placeholders with the actual values returned from the db.properties file):
    MySQL/Maria DB
    
    mysqldump --databases database_name --host=database_hostname --port=database_port -u user_name -p > $HOME/database_name-backup-`date +%F`-CM.sql
    PostgreSQL/Embedded
    
    pg_dump -h database_hostname -U user_name -W -p database_port database_name > $HOME/database_name-backup-`date +%F`-CM.sql
    Oracle
    Work with your database administrator to ensure databases are properly backed up.
  2. 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:
    • Cloudera Manager Server - Contains all the information about services you have configured and their role assignments, all configuration history, commands, users, and running processes. This relatively small database (< 100 MB) is the most important to back up.
    • Oozie Server - Contains Oozie workflow, coordinator, and bundle data. Can grow very large. (Only available when installing CDH 5 or CDH 6 clusters.)
    • Sqoop Server - Contains entities such as the connector, driver, links and jobs. Relatively small. (Only available when installing CDH 5 or CDH 6 clusters.)
    • Reports Manager - Tracks disk utilization and processing activities over time. Medium-sized.
    • Hive Metastore Server - Contains Hive metadata. Relatively small.
    • Hue Server - Contains user account information, job submissions, and Hive queries. Relatively small.
    • Sentry Server - Contains authorization metadata. Relatively small.
    • Cloudera Navigator Audit Server - Contains auditing information. In large clusters, this database can grow large.(Only available when installing CDH 5 or CDH 6 clusters.)
    • Cloudera Navigator Metadata Server - Contains authorization, policies, and audit report metadata. Relatively small.(Only available when installing CDH 5 or CDH 6 clusters.)
    • DAS PostgreSQL server - Contains Hive and Tez event logs and DAG information. Can grow very large.
    • Ranger Admin - Contains administrative information such as Ranger users, groups, and access policies. Medium-sized.
    • Streaming Components:
      • Schema Registry - Contains the schemas and their metadata, all the versions and branches. You can use either MySQL, Postgres, or Oracle.
      • Streams Messaging Manager Server - Contains Kafka metadata, stores metrics, and alert definitions. Relatively small.

    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
    To back up the MySQL database, run the mysqldump command on the MySQL host, as follows:m
    mysqldump -hhostname -uusername -ppassword database > /tmp/database-backup.sql
    For example, to back up the Activity Monitor database amon created in Creating Databases for Cloudera Software, on the local host as the root user, with the password amon_password:
    mysqldump -pamon_password amon > /tmp/amon-backup.sql
    To back up the sample Activity Monitor database amon on remote host myhost.example.com as the root user, with the password amon_password:
    mysqldump -hmyhost.example.com -uroot -pamon_password amon > /tmp/amon-backup.sql
    You can back up all database using the following command:
    mysqldump --all-databases -ppassword > /tmp/all1/all.sql
    PostgreSQL/Embedded
    To back up a PostgreSQL database, use the same procedure whether the database is embedded or external:
    1. Log in to the host where the Cloudera Manager Server is installed.
    2. Get the name, user, and password properties for the Cloudera Manager database from /etc/cloudera-scm-server/db.properties:
      com.cloudera.cmf.db.name=scm
      com.cloudera.cmf.db.user=scm
      com.cloudera.cmf.db.password=NnYfWIjlbk
    3. Run the following command as root using the parameters from the preceding step:
      # pg_dump -h hostname -p 7432 -U scm > /tmp/scm_server_db_backup.$(date +%Y%m%d)
    4. Enter the password from the com.cloudera.cmf.db.password property in step 2.
    5. To back up a database created for one of the roles on the local host as the roleuser user:
      # pg_dump -h hostname -p 7432 -U roleuser > /tmp/roledb
    6. Enter the password specified when the database was created.
    Oracle
    Work with your database administrator to ensure databases are properly backed up.