Backing up Databases
Cloudera recommends that you periodically back up the
databases that Cloudera Manager uses to store configuration, monitoring, and reporting
data and for managed services that require a database:
- Cloudera Manager - Contains all the information about what services you have configured, their role assignments, all configuration history, commands, users, and running processes. This is a relatively small database (<100 MB), and is the most important to back up. A monitoring database contains monitoring information about service and host status. In large clusters, this database can grow large.
- Activity Monitor - Contains information about past activities. In large clusters, this database can grow large.
- Reports Manager - Keeps track of disk utilization and processing activities over time. Medium-sized.
- Hive Metastore - Contains Hive metadata. Relatively small.
- Sentry Server - Contains authorization metadata. Relatively small.
- Cloudera Navigator Audit Server - Contains auditing information. In large clusters, this database can grow large.
Backing Up PostgreSQL Databases
The procedure for backing up a PostgreSQL database is the same whether you
are using an embedded or external database:
- Log in to the host where the Cloudera Manager Server is installed.
- Run the following command as root:
cat /etc/cloudera-scm-server/db.properties. The db.properties file contains: # Auto-generated by scm_prepare_database.sh # Mon Jul 27 22:36:36 PDT 2011 com.cloudera.cmf.db.type=postgresql com.cloudera.cmf.db.host=host:7432 com.cloudera.cmf.db.name=scm com.cloudera.cmf.db.user=scm com.cloudera.cmf.db.password=NnYfWIjlbk
- Run the following command as root using the parameters
from the preceding step:
# pg_dump -h host -p 7432 -U scm > /tmp/scm_server_db_backup.$(date +%Y%m%d)
- Enter the password specified for the com.cloudera.cmf.db.password property on the last line of the db.properties file. If you are using the embedded database, Cloudera Manager generated the password for you during installation. If you are using an external database, enter the appropriate information for your database.
Backing Up MySQL Databases
To back up the MySQL database, run the mysqldump
command on the MySQL host, as follows:
$ mysqldump -hhostname -uusername -ppassword database > /tmp/database-backup.sql
For example, to back up the Activity Monitor database
amon 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 -pcloudera amon > /tmp/amon-backup.sql
Backing Up Oracle Databases
For Oracle, work with your database administrator to ensure databases are properly backed up.
<< Changing Hostnames | Cloudera Management Service >> | |