How do I back up the CLM cluster databases?
Purpose
Perform this procedure to manually create a backup of one or more of the following in a CLM cluster:
Note: release-ID in a file path has the following format:
R.r.p-rel.version
where
R.r.p is the CLM release, in the form MAJOR.minor.patch
version is a numeric value
Steps
1 |
Log in as the root or CLM admin user on the CLM deployer host. |
2 |
Open a console window. |
3 |
If a common backup storage location is defined in the CLM configuration, go to Step 7. |
4 |
Open the following file with a plain-text editor such as vi: /opt/nsp/NSP-CN-DEP-release-ID/NSP-CN-release-ID/config/nsp-config.yml |
5 |
If required, configure the backups to be stored on an NFS server.
|
6 |
If you made any changes to the nsp-config.yml file in Step 5, enter the following to apply the changes to the cluster: Note: If the CLM cluster VMs do not have the required SSH key, you must include the --ask-pass argument in the nspdeployerctl command, as shown in the following example, and are subsequently prompted for the root password of each cluster member: nspdeployerctl --ask-pass install --config --deploy # /opt/nsp/NSP-CN-DEP-release-ID/bin/nspdeployerctl install --config --deploy ↵ |
7 |
Enter the following: # cd /opt/nsp/NSP-CN-DEP-release-ID/NSP-CN-release-ID/tools/database ↵ |
8 |
Enter one or more of the following, as required, to back up system data and databases: Note: It is recommended that you back up all system data and databases. Note: You must not proceed to the next step until each backup job is complete.
where backup_dir is the directory in which to store the backup The backup script displays messages like the following as a backup job proceeds: ---------------- BEGIN : Backing up database-backup ---------------- job.batch/backup_job created timestamp LOG: Waiting for job backup_job at namespace namespace to finish... timestamp LOG: backup done successfully timestamp LOG: Removing job backup_job at namespace namespace job.batch "backup_job" deleted timestamp LOG: Job backup_job at namespace namespace deleted ----------------- END : Backing up database_backup ----------------- ----------------- BEGIN : Fetching backup database ----------------- timestamp LOG: Fetching database backup from pod nsp-backup-storage-0 at namespace namespace timestamp LOG: Latest database backup is database_backup_timestamp.tar.gz tar: removing leading '/' from member names timestamp LOG: Latest database backup fetched successfully ----------------- END : Fetching backup database ------------------- A backup filename has the following format: database_backup_timestamp.tar.gz where database is the database name, for example, nspos-neo4j timestamp is the start time of the database backup |
Safeguard backup files | |
9 |
Transfer the files in backup_dir to a secure location for safekeeping. Note: It is strongly recommended that you transfer each backup file to a secure facility that is outside the local data center. |
10 |
Close the console window. End of steps |