This guide outlines disaster recovery and backup procedures for the On-Prem AgileSec Linux installations. To minimize downtime, this guide provides guidelines for backing up your data and reconstituting the AgileSec Platform from a previous backup in the event of a catastrophic failure.
1. Overview
The platform keeps data in two datastores and depends on an identity (certificates and keys) every service was installed with. A backup captures all three. A recovery restore rebuilds the identity first, by installing the target cluster with the source cluster's identity bundle, then loads the data.
1.1 Guide Scenario Conditions
This guide provides backup and disaster recovery instructions with the following conditions:
|
Supported |
Not supported by this guide |
|---|---|
|
Disaster recovery onto a new target cluster after the source cluster is lost. |
Restoring onto the same cluster the backup came from. |
|
Source and target on exactly the same AgileSec release version. |
Restoring onto a different AgileSec release (upgrade or downgrade during recovery). |
|
Backups stored in AWS S3. |
Restoring from a shared file system (NFS) backup. Note: The restore steps in this guide read from S3 only. |
Info: This guide was validated with a three-node cluster (two backend nodes, one frontend node).
1.2 Guide Definitions
The following terms are used throughout this guide.
|
Term |
Meaning |
|---|---|
|
Source cluster |
AgileSec cluster backups were taken from. In a disaster recovery and restore scenario this cluster no longer exists. |
|
Target cluster |
A new AgileSec cluster, on new VMs, source cluster backups are restored onto. |
|
Identity bundle |
Tarball the installer generates, The identity bundle holds
|
|
Pre-seeded install |
Installing the target cluster with the source cluster's identity bundle and |
2. Guide Prerequisite: Set Backup and Recovery Variables
Set these in every shell session you use for a backup AND recovery steps. Replace the placeholders with your own values.
Directory Path Variables
There are two referenced directory locations in these instructions:
-
installer_dir: the location where the unzipped install files reside, including all installation scripts and supporting files. -
agilesec_install_dir: the location where AgileSec will be installed to.
Export these as bash variables to easily copy and paste guide instructions:
export installer_dir=</path/to/installer>
export agilesec_install_dir=</path/to/installation>
Paths Info: To identify the correct paths, look for the following:
-
agilesec_install_dir(the deployed installation) contains.envfile(s) -
installer_dir(the unpacked installer package) containsscripts/.varsinstead
# Paths
export agilesec_install_dir=</path/to/installation> # the deployed installation
export installer_dir=</path/to/installer> # the unpacked installer package
# Domains (defaults shown; use your cluster's values)
export analytics_internal_domain="kf-agilesec.internal"
export org_domain="kf-agilesec.com"
export analytics_hostname="agilesec"
# This node's internal FQDN, for example backend-1.kf-agilesec.internal.
# Use the FQDN, not 127.0.0.1 or an IP address: the certificates only
# name the FQDN, so TLS verification fails against an IP.
export NODE_FQDN="<node-name>.$analytics_internal_domain"
# Admin client certificate used for OpenSearch and MongoDB
export CA_CERT="$agilesec_install_dir/certificates/ca/agilesec-rootca-cert.pem"
export CLIENT_CERT="$agilesec_install_dir/certificates/$analytics_internal_domain/admin-user-cert.pem"
export CLIENT_KEY="$agilesec_install_dir/certificates/$analytics_internal_domain/admin-user-key.pem"
export OS_URL="https://$NODE_FQDN:9200"
# Backup location
export S3_BUCKET="<backup-bucket>"
export S3_REGION="<bucket-region>" # for example us-east-1
export BACKUP_PREFIX="<environment-name>" # one prefix per environment
# Shorthand for authenticated OpenSearch calls
oscurl() { curl -s --cacert "$CA_CERT" --cert "$CLIENT_CERT" --key "$CLIENT_KEY" "$@"; }
3. Backup the Source Cluster
In order to recover from disaster, it is crucial to have a robust backup strategy including the following considerations:
-
Recovery point objective (RPO). Decide how much data loss is acceptable based on data criticality and your organizational policies, then set backup frequency and retention to match.
-
Keep backups off the cluster. Backups MUST NOT live on the same disk or VM as the data they protect. Store them in object storage (such as AWS S3) or on a separate disaster recovery site.
-
Check every run. Backup scripts should check each command's exit code and confirm backup files exist and are not empty.
-
Practice the restore (drill testing). Run a test restore onto a non-production target cluster every quarter to verify data integrity.
The following items should be backed up to enable cluster recovery in case of disaster.
|
Backup item |
Contains |
Backup Method |
Backup Location (S3) |
|
|---|---|---|---|---|
|
1 |
Identity bundle |
Root CA, certificates and keys, SM keystore, SAML material, Kafka cluster ID, per-node |
Generated by the installer and copied by you. |
|
|
2 |
OpenSearch snapshot |
Scan-finding indices ( |
OpenSearch Snapshot API. |
The snapshot repository at |
|
3 |
OpenSearch security config |
Roles, role mappings, internal users, tenants, and the rest of the security plugin's configuration |
AgileSec Security Admin Script |
|
|
4 |
MongoDB dump |
Operational data: configuration state, platform settings, policies, scan history |
MongoDB dump command |
|
Important: Use one timestamp for all four items of a backup run so a restore can pick a matching set:
export STAMP=$(date -u +%Y%m%dt%H%M%Sz) # for example 20260917t192034z
The OpenSearch snapshot is named $STAMP, and the other three items carry $STAMP in their file or folder names.
Backup 1: Identity Bundle
The installer generates the identity bundle once, on the node where certificates are first generated, and places an identical copy on every other node during installation. Back it up from any one node:
BUNDLE="$installer_dir/certificates/${analytics_internal_domain}-certs.tgz"
tar -tzf "$BUNDLE" # confirm it is readable; lists ca/, the domain folders, and env.<node> files
aws s3 cp "$BUNDLE" \
"s3://$S3_BUCKET/$BACKUP_PREFIX/identity-bundle/${STAMP}-${analytics_internal_domain}-certs.tgz"
The bundle contains the root CA's private key. Restrict access to the backup location accordingly.
Warning: If OpenSearch uses static AWS keys in opensearch.keystore, those keys are not in the bundle or in any snapshot, because the keystore is local to each node. When restoring, the static AWS keys must be added again on the target cluster to match the source cluster.
Backup 2: OpenSearch
OpenSearch snapshots are the only supported way to back up OpenSearch data.
2.1 Set up the snapshot repository (once)
Register a snapshot repository before the first backup. The restore steps in this guide read from S3.
The repository must be reachable from every OpenSearch node, including nodes with only the cluster-manager role. If even one node lacks the S3 plugin, registration fails with the error repository type [s3] does not exist.
-
Install
repository-s3plugin on every OpenSearch node. On each OpenSearch node, one node at a time, install therepository-s3plugin and restart OpenSearch on the node.--batchaccepts the plugin's permission prompt, which otherwise waits for input.Bashcd "$agilesec_install_dir/services/opensearch/bin" sudo ./opensearch-plugin install --batch repository-s3 cd "$agilesec_install_dir" && ./scripts/manage.sh restart opensearchWait until the cluster reports
greenbefore moving to the next node:Bashoscurl "$OS_URL/_cluster/health?pretty" | grep -E '"status"|"number_of_nodes"' -
Credentials.
-
If the nodes run with an IAM instance profile that can reach the bucket, skip this step, the plugin uses the IAM instance profile automatically.
-
Otherwise, add static keys on every node:
Bashcd "$agilesec_install_dir/services/opensearch/bin" ./opensearch-keystore add s3.client.default.access_key ./opensearch-keystore add s3.client.default.secret_key
-
-
Bucket access. Grant least-privilege access to the bucket only:
JSON{ "Version": "2012-10-17", "Statement": [{ "Sid": "AgileSecBackups", "Effect": "Allow", "Action": ["s3:PutObject", "s3:GetObject", "s3:DeleteObject", "s3:ListBucket", "s3:GetBucketLocation"], "Resource": ["arn:aws:s3:::<backup-bucket>", "arn:aws:s3:::<backup-bucket>/*"] }] } -
Register the repository as
backup, with$BACKUP_PREFIXas its base path:Bashoscurl -X PUT "$OS_URL/_snapshot/backup" -H 'Content-Type: application/json' \ -d "{\"type\":\"s3\",\"settings\":{\"region\":\"$S3_REGION\",\"bucket\":\"$S3_BUCKET\",\"base_path\":\"$BACKUP_PREFIX\"}}" -
Verify every node can reach the snapshot repository. Run the following command on every node:
Bashoscurl -X POST "$OS_URL/_snapshot/backup/_verify?pretty"The response lists every node in the cluster. A
repository_verification_exceptionthat mentions S3AccessDeniedmeans the bucket policy from step 3 is missing or not attached to the nodes' role.
The S3 layout for one environment then looks like this:
|
Path under |
Contents |
|---|---|
|
|
OpenSearch snapshot repository files (managed by OpenSearch) |
|
|
Identity bundle |
|
|
Security config backup |
|
|
MongoDB dump |
2.2 Take a snapshot
From backend-1 take an OpenSearch snapshot:
oscurl -X PUT "$OS_URL/_snapshot/backup/$STAMP?wait_for_completion=true" \
-H 'Content-Type: application/json' \
-d '{"indices":"-.opendistro_security,agilesec.*,.kibana_*_*_*,-.kibana*admintenant*","ignore_unavailable":true,"include_global_state":false}'
The index list includes the scan-finding indices and every tenant's saved objects. Two indices are left out of the snapshot on purpose.
|
Pattern |
Included |
Why |
|---|---|---|
|
|
Yes |
Scan findings. |
|
|
Yes |
Each tenant's dashboards, visualizations, and saved searches. |
|
|
No |
The security plugin's live index. This index’s content is backed up separately with the OpenSearch security config. |
|
|
No |
The admin tenant index holds built-in demo content. Save dashboards you want backed up under your org tenant. |
Note: If you use v2 sensors, or upgraded from AgileSec 3.4 or earlier, some data may still sit in isg.* indices. Add isg.* to the index list in that case.
When the snapshot finishes, wait_for_completion=true makes the call return. Confirm the result:
oscurl "$OS_URL/_snapshot/backup/$STAMP?pretty" | grep -E '"state"|"total"|"successful"|"failed"'
Expect result is "state" : "SUCCESS" and failed equal to 0.
Backup 3: OpenSearch Security Config
On backend-1, run securityadmin.sh -backup without -t to capture all ten configuration types:
export OS_BACKUP_DIR="$HOME/backups/opensearch-security/$STAMP"
mkdir -p "$OS_BACKUP_DIR"
export OPENSEARCH_JAVA_HOME="$agilesec_install_dir/bin/java"
"$agilesec_install_dir/services/opensearch/plugins/opensearch-security/tools/securityadmin.sh" \
-h "$NODE_FQDN" -p 9200 -backup "$OS_BACKUP_DIR" -icl -nhnv \
-cacert "$CA_CERT" -cert "$CLIENT_CERT" -key "$CLIENT_KEY"
For S3, upload the result:
aws s3 cp --recursive "$OS_BACKUP_DIR/" "s3://$S3_BUCKET/$BACKUP_PREFIX/opensearch-security/$STAMP/"
Backup 4: MongoDB
Run mongodump against the primary or a secondary mongodb node. --oplog makes the dump consistent to a single point in time across the replica set.
Important: --oplog only works on a full dump, so do not combine with --db or --collection.
export MDB_BACKUP_DIR="$HOME/backups/mongo/$STAMP"
mkdir -p "$MDB_BACKUP_DIR"
CLIENT_PEM="$(mktemp)"; chmod 600 "$CLIENT_PEM"
cat "$CLIENT_CERT" "$CLIENT_KEY" > "$CLIENT_PEM"
"$agilesec_install_dir/bin/mongodb-tools/bin/mongodump" \
--uri "mongodb://$NODE_FQDN:27017" --oplog --out "$MDB_BACKUP_DIR" \
--ssl --sslCAFile "$CA_CERT" --sslPEMKeyFile "$CLIENT_PEM" \
--authenticationMechanism MONGODB-X509
rm -f "$CLIENT_PEM"
tar -czf "/tmp/mongo-$STAMP.tar.gz" -C "$(dirname "$MDB_BACKUP_DIR")" "$STAMP"
aws s3 cp "/tmp/mongo-$STAMP.tar.gz" "s3://$S3_BUCKET/$BACKUP_PREFIX/mongodb/mongo-$STAMP.tar.gz"
rm -f "/tmp/mongo-$STAMP.tar.gz"
4. Disaster Recovery: Restore Target Cluster
Restoring after disaster recovery has five stages. The stage order matters. The target cluster has to carry the source cluster's identity before any data is restored. The restored data and the services reading the data in the target cluster expect the identity to match the source cluster’s.
Prerequisite: Recovery Requirements
The following must match between target cluster and the source cluster before proceeding with restoration:
|
Requirement |
Why |
|
|---|---|---|
|
1 |
Fresh VMs with no AgileSec installation yet. |
The pre-seeded install in Stage 1 is the target's first and only installation. |
|
2 |
AWS CLI with read access to the backup bucket on every node. |
Every restore stage downloads from S3. |
|
3 |
Exactly the same AgileSec release. |
Restoring across different releases is not supported by this guide. |
|
4 |
Same |
The certificates in the identity bundle name these domains. |
|
5 |
Same number of nodes, with the same node names and roles (for example |
The bundle holds one |
Pick one backup set and confirm all prerequisite items exist for the backup set’s stamp:
aws s3 ls "s3://$S3_BUCKET/$BACKUP_PREFIX/identity-bundle/"
aws s3 ls "s3://$S3_BUCKET/$BACKUP_PREFIX/opensearch-security/"
aws s3 ls "s3://$S3_BUCKET/$BACKUP_PREFIX/mongodb/"
export STAMP="<stamp of the chosen backup set>" # for example 20260917t192034z
The OpenSearch snapshot for the same stamp is checked in Stage 2 once the repository is registered on the target.
Reminder: If OpenSearch uses static AWS keys in opensearch.keystore, those keys are not in the backed up identity bundle or in any snapshot, because the keystore is local to each node. When restoring, the static AWS keys must be added again on the target cluster to match the source cluster.
Stage 1: Restore Identity Bundle and Install Identical Target Cluster
Install the target cluster pre-seeded with the source cluster's certificates and .env files, so every service is built from the source cluster's identity.
-
Download and extract the identity bundle from the S3 backup:
Bashmkdir -p "$HOME/restore-identity-bundle" aws s3 cp "s3://$S3_BUCKET/$BACKUP_PREFIX/identity-bundle/${STAMP}-${analytics_internal_domain}-certs.tgz" \ "$HOME/restore-identity-bundle/" cd "$HOME/restore-identity-bundle" tar -xzf "${STAMP}-${analytics_internal_domain}-certs.tgz" ls # Expected result: ca/ $analytics_internal_domain/ $analytics_hostname.$org_domain/ env.<node> files -
Copy the three certificate folders from the identity bundle into the installer:
Bashcp -r "$analytics_hostname.$org_domain" ca "$analytics_internal_domain" "$installer_dir/certificates/" -
On each node, copy each node's respective
.envfile from the bundle to$installer_dir/.env. For example, onbackend-1:Bashcp env.backend-1 "$installer_dir/.env" -
On each node, edit
$installer_dir/.envand change only the IP address fields to the target cluster's IPs:
|
Field |
Change to |
|---|---|
|
|
This node's IP address |
|
|
The backend nodes' IPs, one per line, in the same order as |
|
|
The frontend nodes' IPs, in the same order as |
|
|
The coordinator nodes' IPs, if you have any, in the same order as |
Leave every other field .env exactly as is. Several fields, including the SM key aliases, opensearch_exchange_key, platform_init_org_saml_id, and webui_nextauth_secret, are unique to the source cluster's installation. The restored data depends on them.
-
From
installer_dir, tune the node, and then run the install script. Replace<install-user>with the Linux user who owns the installation (for example,ec2-user):Bashcd "$installer_dir" sudo ./scripts/tune.sh -u <install-user> ./install_analytics.sh install -u <install-user> -p "$agilesec_install_dir" --non-interactive
Warning: Do NOT run ./generate_envs/generate_envs.sh or generate_certs.sh on the target cluster. These will cause the target cluster to generate its own identity instead of using the source cluster's.
-
Repeat steps 1 to 5 on every node.
Stage 2: Restore OpenSearch
Run these steps from backend-1 unless a step says otherwise.
-
Install the S3 plugin on every OpenSearch node, one node at a time. A new installation does not have the S3 plugin by default. (These instructions are identical to setting up the snapshot repository during backup procedures.)
-
On each OpenSearch node, one node at a time, install the
repository-s3plugin and restart OpenSearch on the node.--batchaccepts the plugin's permission prompt, which otherwise waits for input:Bashcd "$agilesec_install_dir/services/opensearch/bin" sudo ./opensearch-plugin install --batch repository-s3 cd "$agilesec_install_dir" && ./scripts/manage.sh restart opensearch -
Wait until the cluster reports
greenbefore moving to the next node:Bashoscurl "$OS_URL/_cluster/health?pretty" | grep -E '"status"|"number_of_nodes"'
-
-
Register the backup repository with the same bucket, region, and base path the backup used. The snapshots are already in S3; the target cluster only needs to know where to find them.
-
Run the following command to register the backup repository:
Bashoscurl -X PUT "$OS_URL/_snapshot/backup" -H 'Content-Type: application/json' \ -d "{\"type\":\"s3\",\"settings\":{\"region\":\"$S3_REGION\",\"bucket\":\"$S3_BUCKET\",\"base_path\":\"$BACKUP_PREFIX\"}}" -
{"acknowledged":true}only means the request was well formed. The next step confirms the settings are correct.
-
-
Check the repository and the snapshot.
-
Run the following commands to check the repository and snapshot:
Bashoscurl "$OS_URL/_snapshot/_all?pretty" # the "backup" repository is listed oscurl -X POST "$OS_URL/_snapshot/backup/_verify?pretty" # every node is listed oscurl "$OS_URL/_cat/snapshots/backup?v" # $STAMP is listed with status SUCCESS -
If
$STAMPis missing, the bucket, region, or base path does not match the backup. Register the repository again with the right values.
-
-
Delete empty indices for restore replacement. A new installation creates empty scan-finding indices and fills the org tenant with default dashboards. The restore API refuses to overwrite an existing index, even if empty, so these empty indices must be deleted before restoration.
|
Pattern |
Action |
Why |
|
|---|---|---|---|
|
1 |
|
Delete |
Empty on a new installation; the snapshot recreates them. |
|
2 |
|
Delete |
Default dashboard content; the snapshot replaces them. |
|
3 |
|
Keep |
The security plugin needs it. Step 6 restores its content. |
|
4 |
|
Keep |
Demo content local to this installation. |
-
-
List the empty indices to delete, then delete them:
BashTARGET="agilesec.*,.kibana_*_*_*,-.opendistro_security,-.kibana*admintenant*" oscurl "$OS_URL/_cat/indices/$TARGET?v&s=index&h=index,health,docs.count" oscurl -X DELETE "$OS_URL/$TARGET"
-
Warning: Run step 5 to restore the snapshot immediately after this step, and keep everyone out of OpenSearch Dashboards in between. Opening Dashboards recreates the tenant's .kibana index, and the restore then fails with the message an open index with same name already exists in the cluster. If this error happens, run the delete again and restore immediately.
-
Restore the snapshot.
-
Run the following to restore the snapshot:
Bashoscurl -X POST "$OS_URL/_snapshot/backup/$STAMP/_restore?wait_for_completion=true" \ -H 'Content-Type: application/json' \ -d '{"indices":"agilesec.*,.kibana_*_*_*,-.opendistro_security,-.kibana*admintenant*","ignore_unavailable":true,"include_global_state":false}'-
ignore_unavailableis required. The two excluded patterns name indices not in the snapshot. If you addedisg.*to the backup, add it here, too.
-
-
The response should show
"failed":0. -
Wait for the cluster to finish building replicas, then check the restored indices:
Bashoscurl "$OS_URL/_cluster/health?wait_for_status=green&timeout=120s&pretty" | grep '"status"' oscurl "$OS_URL/_cat/indices/agilesec.*,.kibana_*_*_*?v&s=index&h=index,health,docs.count" -
Indices can show
yellowfor a short time after the restore while replicas are built. However, every index should end upgreenafter snapshot restoration.
-
-
Restore the security config.
-
Download the backup for the same stamp, then apply roles, tenants, role mappings, and internal users:
Bashexport OS_BACKUP_DIR="$HOME/restore-security-config/$STAMP" mkdir -p "$OS_BACKUP_DIR" aws s3 cp --recursive "s3://$S3_BUCKET/$BACKUP_PREFIX/opensearch-security/$STAMP/" "$OS_BACKUP_DIR/" export OPENSEARCH_JAVA_HOME="$agilesec_install_dir/bin/java" for pair in roles:roles.yml tenants:tenants.yml rolesmapping:roles_mapping.yml internalusers:internal_users.yml; do "$agilesec_install_dir/services/opensearch/plugins/opensearch-security/tools/securityadmin.sh" \ -h "$NODE_FQDN" -p 9200 -icl -nhnv -t "${pair%%:*}" -f "$OS_BACKUP_DIR/${pair#*:}" \ -cacert "$CA_CERT" -cert "$CLIENT_CERT" -key "$CLIENT_KEY" done -
Each run ends with
Done with success. The backup also holds the other six configuration types, includingconfig.yml(SSO and LDAP settings). This procedure does not restore them.
-
Stage 3: Restore MongoDB
-
Stop the services writing to MongoDB. MongoDB itself keeps running.
--disable-healthcheckcomments out thescripts/health_check.shcron entry, which would restart the stopped services while the restore is running.Bashcd "$agilesec_install_dir" ./scripts/manage.sh stop --disable-healthcheck analytics-manager ingestion indexing scheduler sm # on each backend node ./scripts/manage.sh stop --disable-healthcheck api webui cbom # on the frontend node -
Find the primary. Run the restore against the replica set's primary:
BashCLIENT_PEM="$(mktemp)"; chmod 600 "$CLIENT_PEM" cat "$CLIENT_CERT" "$CLIENT_KEY" > "$CLIENT_PEM" "$agilesec_install_dir/bin/mongosh" "mongodb://$NODE_FQDN:27017" --quiet \ --tls --tlsCAFile "$CA_CERT" --tlsCertificateKeyFile "$CLIENT_PEM" \ --authenticationDatabase '$external' --authenticationMechanism MONGODB-X509 \ --eval 'rs.status().members.forEach(m => print(m.name, m.stateStr))' export MONGO_URI="mongodb://<primary node FQDN>:27017" -
Download and extract the dump from S3:
Bashmkdir -p "$HOME/restore-mongo" aws s3 cp "s3://$S3_BUCKET/$BACKUP_PREFIX/mongodb/mongo-$STAMP.tar.gz" "$HOME/restore-mongo/" tar -xzf "$HOME/restore-mongo/mongo-$STAMP.tar.gz" -C "$HOME/restore-mongo" ls "$HOME/restore-mongo/$STAMP" # one folder per database, plus oplog.bson -
Restore the MongoDB dump:
Bash"$agilesec_install_dir/bin/mongodb-tools/bin/mongorestore" \ --uri "$MONGO_URI" --drop --nsExclude='admin.*' \ --ssl --sslCAFile "$CA_CERT" --sslPEMKeyFile "$CLIENT_PEM" \ --authenticationMechanism MONGODB-X509 \ "$HOME/restore-mongo/$STAMP"
|
Flag |
Why |
|---|---|
|
|
Drops each collection before restoring, so the result matches the backup. |
|
|
Leaves the Restoring |
|
Do not use |
|
-
Verify failed count is 0. The last line of the output reads
<N> document(s) restored successfully. <N> document(s) failed to restore.Confirm the failed count is0. -
Check the replica set, with the same
mongoshcommand as step 2:-
Bash
CLIENT_PEM="$(mktemp)"; chmod 600 "$CLIENT_PEM" cat "$CLIENT_CERT" "$CLIENT_KEY" > "$CLIENT_PEM" "$agilesec_install_dir/bin/mongosh" "mongodb://$NODE_FQDN:27017" --quiet \ --tls --tlsCAFile "$CA_CERT" --tlsCertificateKeyFile "$CLIENT_PEM" \ --authenticationDatabase '$external' --authenticationMechanism MONGODB-X509 \ --eval 'rs.status().members.forEach(m => print(m.name, m.stateStr))' export MONGO_URI="mongodb://<primary node FQDN>:27017" -
Every member should report
PRIMARY,SECONDARY, orARBITER. -
After checking, remove the client PEM:
Bashrm -f "$CLIENT_PEM"
-
Stage 4: Restart every service
-
Restart all services on every node, one node at a time, backend nodes first:
Bashcd "$agilesec_install_dir" ./scripts/manage.sh restart ./scripts/manage.sh status -
Wait until
statusshows every service running before moving to the next node. This one restart covers everything the restore touched, including services holding long-lived MongoDB, Kafka, or TLS connections. -
If the health check cron was enabled before the restore, turn it back on by restarting with
--enable-healthcheckinstead:Bash./scripts/manage.sh restart --enable-healthcheck
Important: Over a non-interactive SSH session, manage.sh restart keeps the service in the foreground and does not return. In this case, run the service restart detached:
setsid nohup ./scripts/manage.sh restart > /tmp/restart.log 2>&1 < /dev/null &
Stage 5: Verify Recovery
-
Check the identity on every node
-
Ensure
agilesec_install_dir,analytics_internal_domain,analytics_hostname, andorg_domainvariables are set correctly. -
restore_checklist.sh(Appendix B) compares each node against the source cluster's identity bundle. This script only reads and changes nothing. Runrestore_checklist.shon every node:Bashexport source_identity_bundle="$HOME/restore-identity-bundle/${STAMP}-${analytics_internal_domain}-certs.tgz" ./restore_checklist.sh -
The expected result on every node is:
== All checks passed. == -
Checks not applicable to a node are reported as
[SKIP]. The exit code is0when every check passes and1otherwise. Passwords in the output are redacted unless you add--show-secrets. Appendix A lists what each check covers.
-
-
Check the platform. Perform the following checks to verify the restored cluster is working as expected:
|
Check |
Expected result |
What the check confirms |
|---|---|---|
|
Sign in to the application |
Sign-in works and you stay signed in |
Identity: SM keystore, JWT signing, public certificate |
|
Open the Overview Dashboard |
The source cluster's scan data is shown |
OpenSearch restore |
|
Open Scan History |
The source cluster's scans are listed |
MongoDB restore |
|
Open Advanced Dashboard |
The OpenSearch Advanced Dashboard opens without an error |
SAML single sign-on into OpenSearch Dashboards |
|
Run a network scan |
The network scan completes |
Scheduler, ingestion, and scan worker trust and tokens |
Recovery Troubleshooting
If any verification checks fail, troubleshoot with the following:
|
Symptom |
Likely cause |
What to do |
|
|---|---|---|---|
|
1 |
|
The install command is waiting for the permission prompt |
Add |
|
2 |
Repository registration fails with |
One OpenSearch node is missing |
Install the s3 plugin on every node, including |
|
3 |
Restore fails with |
Repository not registered, or repository registered with a different bucket, region, or base path |
Stage 2 steps 2 and 3 |
|
4 |
Restore fails with |
Someone opened Dashboards between the delete and the restore |
Delete again and restore immediately (Stage 2, steps 4 and 5) |
|
5 |
|
|
Re-run with |
|
6 |
|
The bundle's certificate folders were not copied into |
Reinstall the node as described in Stage 1 |
|
7 |
|
The node was installed with its own identity (not the source cluster’s) or with a |
Reinstall the node as described in Stage 1 |
|
8 |
Sign-in fails in browser with |
The |
Reinstall the node as described in Stage 1 |
|
9 |
A service fails right after the restore with MongoDB, Kafka or TLS errors |
The service was not restarted |
Stage 4 |
Note: If the checks pass but a scan still fails, the scan worker's own log under logs/scanWorker/ usually declares why. This log is deleted when the job ends, unless APP_SCAN_SCHEDULER_PROFILE_WORKER_WORKDIR_DELETE and APP_SCAN_SCHEDULER_SENSOR_WORKER_WORKDIR_DELETE in config_envs/scheduler are set to false.
Set both variables to false, restart scheduler, run the scan again, and read the log. After reading the log and troubleshooting, set these variables back to true.
Appendices
Appendix A: Where the Cluster Identity is Copied
During installation, several services make their own copy of identity material from the certificates, keystore, and .env values, and never read the originals again. A pre-seeded install builds every copy from the source cluster's identity. A target cluster installed with its own identity would have every one of them wrong, and replacing certificates/ afterward would not fix them. This is why Restore Stage 1 installs the target with the source cluster's bundle.
|
Identity copy |
Location(s) |
Symptom when target identity does not match |
Service(s) to restart after correcting |
Checked by |
|
|---|---|---|---|---|---|
|
1 |
SM keystore password and key aliases |
Nodes running
|
Sign-in succeeds, then you are signed out; API calls return |
|
Yes (check 1) |
|
2 |
OpenSearch TLS certificate files |
Every node:
|
Node-to-node SSL errors ( |
|
Yes (check 2) |
|
3 |
JWT signing alias and public key for |
Frontend nodes:
|
Sign-in succeeds, then API calls return 401 |
|
Public key only (check 3). The alias must match the source cluster's |
|
4 |
SAML IdP metadata |
Frontend nodes:
|
Advanced Dashboard fails with |
|
Yes (check 4) |
|
5 |
SAML signing passphrase |
Frontend nodes:
|
|
|
Yes (check 4) |
|
6 |
SAML signing private key |
Frontend nodes:
|
|
|
Yes (check 4) |
|
7 |
MongoDB TLS keystore password for |
Backend nodes and
|
Scans do not run; logs show |
|
Yes (check 5) |
|
8 |
Root CA in the JVM trust store |
Every node:
|
Scans do not run; logs show |
|
Yes (check 6) |
|
9 |
JWT signing alias and public key for |
Backend nodes:
|
|
|
Yes; public key only (check 7). The alias must match the source cluster's |
|
10 |
JWT signing alias for |
Backend nodes:
|
|
|
No. The alias must match the source cluster's |
|
11 |
Root CA in the OS trust store |
Every node:
|
Scans stay queued; the scan worker log shows |
None; the scan worker reads it on every run |
Yes (check 8) |
|
12 |
Public-facing HAProxy certificate |
Frontend nodes:
|
Browser sign-in fails with |
|
Yes (check 9) |
Appendix B: restore_checklist.sh
Save the script on every node as restore_checklist.sh and make it executable (chmod +x restore_checklist.sh).
Sample output
Output from a validated restore on a three-node cluster, run with source_identity_bundle set (as in Stage 5 step 1). Paths are shown as placeholders. Each node skips checks for services they do not run. Both checklists end successfully with exit code 0.

