Back up Cloud Management Platform

Back up your Cloud Management Platform (CMP) database and application files before making major changes, such as upgrading to a new CMP version

The backup process consists of two steps:

  1. Backing up the CMP database
  2. Backing up the CMP files

Complete both steps to ensure a full backup of your environment.

These steps cover a single-node deployment, where the web server, job engine, and database all run on one appliance. If your database or shared storage runs on separate hosts, contact CloudBolt Support before backing up.

Prerequisites

Before you begin, ensure:

  • You have SSH access to the database server
  • SSH access from the database server to the destination server is configured
  • Sufficient disk space is available on the destination server
  • Required tools (pg_dump, pv, gzip) are installed on the database server

Back up the CMP database

  1. SSH into your database server.

  2. Switch to the root account:

    sudo su -
    
  3. Retrieve the database password:

    postgresql_pass=$(cat /var/opt/cloudbolt/.postgresql_password | grep postgresql_pass | cut -d '=' -f 2)
    
  4. Create the database backup:

    PGPASSWORD=${postgresql_pass} pg_dump -h localhost -p 5432 -U cb_dba -F t cloudbolt |
      pv |
      gzip |
      ssh <username>@<destination-ip-address> "cat > /<destination-directory>/pg_base_backup_$(date +%Y%m%d_%H%M%S).tar.gz"
    

Result: A .tar.gz backup file is created on the destination server.

Back up the CMP files

  1. SSH into your CMP server.

  2. Switch to the root account:

    sudo su -
    
  3. Stop the Apache HTTP Server:

    systemctl stop httpd
    
  4. Stop the job engine:

    supervisorctl stop jobengine:*
    
  5. Export the /var/opt/cloudbolt/ and /var/www/html/cloudbolt/static/uploads/ directories:

    /opt/cloudbolt/manage.py cb_export -ic -is -nm -na
    
  6. Start the Apache HTTP Server:

    systemctl start httpd
    
  7. Start the job engine:

    supervisorctl start jobengine:*
    

Result: An export archive is generated, and the web server and job engine are running again.