Creating Backups
Notation:
-
OS_HOME– OpenSearch home directory, typically/app/opensearch/ -
OSD_HOME– OpenSearch Dashboards home directory, typically/app/opensearch-dashboards/ -
LOGSTASH_HOME– Logstash home directory, typically/app/logstash/ -
SBM_HOME– Smart Beat Manager home directory, typically/app/smartBeatManager/ -
SB_HOME– Smart Beat home directory, typically/app/smartBeat/
Components and Files for Backup
To obtain the required certificates, the entire config directory is copied, which contains all critical files, including the admin certificate and its private key.
1. Smart Monitor Master Node and Smart Monitor Data Storage
The admin certificate and its private key should be stored on a separate server (e.g., under the control of a system administrator with access granted only upon request). These files provide full access to the entire cluster. During Smart Monitor installation, the private key and admin certificate are generated on the first node, typically the Smart Monitor Data Storage node.
Files:
-
ca-cert.pem -
node-cert.pem -
node-key.pem -
opensearch.yml
Location: ${OS_HOME}/config
Backup commands:
mkdir -p /app/backup/opensearch_$(date +%Y%m%d)/
cp -r ${OS_HOME}/config /app/backup/opensearch_$(date +%Y%m%d)/
2. Smart Monitor Web
Files:
-
ca-cert.pem -
node-cert.pem -
node-key.pem -
opensearch_dashboards.yml
Location: ${OSD_HOME}/config
Backup commands:
mkdir -p /app/backup/opensearch-dashboards_$(date +%Y%m%d)/
cp -r ${OSD_HOME}/config /app/backup/opensearch-dashboards_$(date +%Y%m%d)/
3. Smart Monitor Data Collector
Files:
-
ca-cert.pem -
node-cert.pem -
node-key.pem
Location: ${LOGSTASH_HOME}/config
Backup commands:
mkdir -p /app/backup/logstash_$(date +%Y%m%d)/
cp -r ${LOGSTASH_HOME}/config /app/backup/logstash_$(date +%Y%m%d)/
4. Smart Beat Manager
Files:
-
ca-cert.pem -
cert.pem -
cert.key
Location: ${SBM_HOME}/etc/ssl
Backup commands:
mkdir -p /app/backup/certs_$(date +%Y%m%d)/sbm
cp ${SBM_HOME}/etc/ssl/{ca-cert.pem,cert.pem,key.pem} /app/backup/certs_$(date +%Y%m%d)/sbm/
Smart Beat
Files:
-
ca-cert.pem -
cert.pem -
cert.key
Location: ${SB_HOME}/cert
Backup commands:
mkdir -p /app/backup/certs_$(date +%Y%m%d)/sb
cp ${SB_HOME}/cert/{ca-cert.pem,cert.pem,key.pem} /app/backup/certs_$(date +%Y%m%d)/sb/