Backup and Recovery in Non-HA Mode

Recommendations

To effectively manage your CloudCenter deployment, backup your deployment on a daily basis – you can setup a cronjob to automatically perform this backup.

If you are upgrading the CloudCenter deployment, the process differs. See Upgrade for additional context.

The backup and recover procedure is performed on a per component basis and the procedure for backup is the same for all components. Instead of repeating this procedure for each role, the procedure identifies the applicable roles for each component in the HA and standalone modes. For the HA mode, see Backup and Recovery in HA Mode.

CCM

Use this procedure for the CCM, CCM_SA, and MGMTPOSTGRES roles (see Component Modes and Roles for additional context).

Backup CCM Data

Backup the webapp folder containing the exploded war files to a backup folder (the following example uses /mnt, you can change this directory as applicable).

This backup only applies to the CCM and CCM_SA servers.

NOW=$(date +"%Y%m%d")
bakdir="/mnt/bak/$NOW"
mkdir -p $bakdir
cd $bakdir

cp -r /usr/local/tomcat/webapps/* .

#This folder generally contains three directories.

Backup the CCM Database

This procedure applies to the CCM server or the MGMTPOSTGRES server.

  1. SSH into the CCM or MGMTPOSTGRES server.

  2. Back up the existing CCM database: 
    1. mkdir /root/backup_date
    2. cd backup_date
    3. pg_dump -U cliqr  -d cliqrdb   > pg_dump.sql

      Enter the PostgreSQL (cliqrdb) username and password at the prompt.

      • Username = cliqr – cannot be changed
      • Password = cliqr – to change this password, see PostgreSQL Password.

Restore the CCM Database

To restore the CCM database, follow this process.

  1. SSH into the CCM server.

  2. Stop the Tomcat service on the CCM server.

    /etc/init.d/tomcat stop
  3. Use the PostgreSQL account to login into the database server and perform the following procedure:

    psql -U postgres -d postgres <password>

    Contact the CloudCenter Support team to obtain this password.

     

    1. Drop the cliqrdb database.

      DROP database cliqrdb;
    2. Create a new cliqrdb database.

      CREATE database cliqrdb;
    3. Exit the PostgreSQL prompt.

      \q 
  4. Use the PostgreSQL account to restore the backed up cliqrdb database: 

    psql -U cliqr -d  cliqrdb < pg_dump.sql

  5. Enter the PostgreSQL username and password at the prompt.

    This restore procedure assumes that you are restoring the CCM on a new server. If you restore the databse on an existing CCM server which already has the database installed and working, then the above procedure might result in errors  – especially if the cliqruser database and user does not exist,

    In this case, run the following commands after logging into PostgreSQL as the root user.

    1. createdb -U postgres -E UNICODE cliqrdb 
      (enter the PostgreSQL user password at the prompt)

    2. psql -U postgres -d  cliqrdb < pg_dump.sql
      (enter the PostgreSQL user password at the prompt)

      cliqrdb=# CREATE USER cliqr WITH PASSWORD 'cliqr' NOCREATEDB NOCREATEUSER;
      cliqrdb=# CREATE schema cliqr authorization cliqr;
      cliqrdb=# GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN schema cliqr to cliqr;
      cliqrdb=# ALTER ROLE cliqr set search_path to cliqr;
      cliqrdb=# \q
  6. Start the Tomcat service on the CCM server.

    /etc/init.d/tomcat start

CCO

Use this procedure for the CCO role (see Component Modes and Roles for additional context).

Backup CCO Database

  1. SSH into the CCO server.
  2. Back up the existing CCO database:  
    1. mkdir /root/backup_date
    2. cd backup_date
    3. mongodump

Restore the CCO Database

  1. SSH into the CCO server.
  2. Recover the CCO database from the current directory: 
    mongorestore
  3. Restart the Tomcat service after restoring.
    /etc/init.d/tomcat restart 

AMQP

The back up scenario is not applicable in the non-HA mode as there is no known data that can be persisted.

To restore, simply launch a new VM and reconfigure the VM.

Health Monitor

The back up scenario is not applicable in the non-HA mode as there is no known data that can be persisted.

To restore, simply launch a new VM and reconfigure the VM.

  • No labels