Back up Cloud Management Platform
2 minute read
The backup process consists of two steps:
- Backing up the CMP database
- 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.
The web server and job engine are stopped while the CMP files are backed up. Perform this process during a scheduled maintenance window.
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
-
SSH into your database server.
-
Switch to the root account:
sudo su - -
Retrieve the database password:
postgresql_pass=$(cat /var/opt/cloudbolt/.postgresql_password | grep postgresql_pass | cut -d '=' -f 2) -
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"Replace
username,destination-ip-address, anddestination-directorywith values appropriate for your environment.
Result: A .tar.gz backup file is created on the destination server.
Back up the CMP files
-
SSH into your CMP server.
-
Switch to the root account:
sudo su - -
Stop the Apache HTTP Server:
systemctl stop httpd -
Stop the job engine:
supervisorctl stop jobengine:* -
Export the
/var/opt/cloudbolt/and/var/www/html/cloudbolt/static/uploads/directories:/opt/cloudbolt/manage.py cb_export -ic -is -nm -na -
Start the Apache HTTP Server:
systemctl start httpd -
Start the job engine:
supervisorctl start jobengine:*
Result: An export archive is generated, and the web server and job engine are running again.