Operations means being able to trust today's work tomorrow.
Seeing the dashboard come to life for the first time feels rewarding. What gives a team lasting confidence is knowing that data survives next month's upgrade, uploaded attachments still open, and someone knows where to look when an alert arrives at night. This chapter breaks continued usability into four responsibilities: backup, restoration, upgrades, and monitoring.
The following material describes operational design and rehearsal procedures. Except for items explicitly listed in this handbook's verification records, it does not claim validation in production, multi-node, or highly available environments. Record the time, versions, dataset, and results of each rehearsal, not just “testing completed.”
First, inventory what you need to recover.
Containers can be recreated. The intelligence and attachments your team has accumulated cannot be recovered simply by pulling an image again. Docker volumes give data a lifecycle separate from containers, but a volume on the same host is not an off-site backup. Read Docker's persistent-storage documentation.
| Item to inventory | Records to retain | Restoration acceptance check |
|---|---|---|
| Knowledge data and platform state | Search-engine version, index scope, and Snapshot identifier | Designated reports, objects, and relationships can be retrieved |
| Attachments and export files | Object-storage bucket, version, or consistent point in time | Attachments download successfully and hashes match the samples |
| In-flight work and processing state | Pending queues, integration state, and pause time | Recovery does not cause endless redelivery or skipped work |
| Deployment configuration and secrets | Compose version, image digests, and secret-storage location | The correct configuration can interpret and access the data |
Agree on RPO and RTO with the team first: how much recent data can be lost, and how quickly must service return? If the answer is “none” while the only procedure is a weekly manual file copy, the problem is a mismatch between the promise and the actual capability.
Create a consistent backup.
Use Elasticsearch's supported Snapshot mechanism and configure a backup repository in advance. Do not archive an active data directory and call it a recoverable Elasticsearch backup. Configuration files and some external settings are not automatically included in a Snapshot either. Read Elastic's Snapshot and restoration scope.
For a single-host teaching environment, start with a maintenance window whose consistency assumptions are easy to explain. The following is a recommended procedure. You must first configure and rehearse the actual Snapshot repository and object-storage backup commands for your deployment:
- Ask users to stop writing, and pause external ingestion and schedules. Wait for current work to finish and record anything still pending.
- Record platform versions, images, and the data cutoff time. Stop applications that write data so no new attachments or index content are created during the backup.
- Keep Elasticsearch running and create a snapshot through the Snapshot API. Confirm success rather than merely confirming that the HTTP request was sent.
- Back up object-storage data and necessary service state from the corresponding point in time. Preserve deployment settings and encryption keys separately under controlled access.
- Create a backup inventory listing each file or snapshot's location, integrity checks, and retention period. Copy the backup into an independent failure domain.
- Resume services and ingestion, and check that no Connector remains unintentionally paused.
cd lab
docker compose images
docker compose stop -t 120 connector-import connector-export
docker compose stop -t 120 worker opencti
# Also pause any additional Connectors, external schedules, and write sources.
# Follow the rehearsed Snapshot and object-storage backup procedure now.
# Resume only after the backup completes and is verified:
docker compose up -d opencti worker connector-import connector-export
docker compose psThese commands demonstrate stopping and resuming services only; they do not back up your data. Stopping containers does not complete a backup when there is no Snapshot repository or attachment-backup procedure. stop does not delete containers or data. Routine maintenance does not require options that delete volumes. Read the Compose stop documentation.
Practice a Snapshot and restoration in the lab.
Start with a separate tutorial index. This lets you check repository permissions, the Snapshot API, restoration, and content comparison without deleting or overwriting platform data. The exercise retains the source index, snapshot, and newly restored index.
docker compose exec -T -u 0 elasticsearch chown 1000:0 /snapshots
python3 snapshot-drill.pyThe first command only corrects ownership of this lab's mounted Snapshot directory. The second creates a tutorial marker, confirms that the snapshot reaches SUCCESS, restores into a new index, and compares the document contents and count. Download the lab script and see the verification record for the actual output.
This rehearsal does not restore OpenCTI indexes, S3 attachments, permissions, or the full service stack. It validates the mechanism. A production restoration still requires the inventory, execution, and acceptance steps below.
A backup is only successful when restoration works.
Build an isolated environment with a search-engine version compatible with the snapshot and the platform/dependency versions recorded at backup time. Before restoring, confirm that the target is a new test environment. Existing production indexes are not practice material; do not delete them casually to resolve name conflicts.
- Prepare matching configuration and keys in the new environment. Keep Connectors paused, and prevent the test environment from sending data to production downstream systems.
- Restore the designated data through the Snapshot procedure, together with attachments and necessary service state from the same backup set.
- Start the platform, check health and logs, and sign in as a regular user.
- Retrieve three previously selected acceptance samples: a report, a directed relationship, and an object with an attachment.
- Download the attachment and compare its hash. Confirm that restricted users still cannot see data they should not access.
- Record elapsed time and omissions, then compare them with RPO and RTO. Correct any mismatch and rehearse again.
Matching object counts do not prove that everything was recovered. A particularly useful acceptance test is to have someone who did not perform the backup follow your documentation, retrieve the designated report, understand its relationships, and open its attachment.
Define both entry and exit criteria for an upgrade.
OpenCTI upgrades run necessary data migrations. The official Docker procedure includes changing image versions, stopping services, pulling images, and restarting. Before production use, also review the target release notes and dependency requirements. Read the official upgrade procedure.
Restore the old environment into a test area and upgrade that copy first. Verify login, queries, creation of tutorial data, ingestion, and attachment retrieval. Define exit criteria in advance, such as a failed migration or an unavailable core workflow, and stop expanding the change when they are met. Pin versions and images for the production upgrade; do not decide during the maintenance window that “the latest version should work.”
Rollback is not merely changing an image tag back. The new version may already have changed data structures, so prepare a recovery plan using the old application and a consistent pre-upgrade backup. Document how writes made during maintenance will be handled; a technically successful rollback is incomplete if users are not told which work must be repeated.
Monitor whether work completes, not just whether containers exist.
cd lab
docker compose ps
docker compose stats --no-stream
docker compose logs --since 15m --tail 100 opencti workerStart each day with a few questions: are queries noticeably slower? Is the queue growing continuously? Has a source stopped updating? Is disk usage growing unexpectedly? Did backups finish, and has a recent restoration succeeded? Trends usually reveal more than a single instantaneous value.
OpenCTI provides operational metrics that can be integrated with monitoring systems. These serve a different purpose from anonymous product-usage statistics. Enable the appropriate export configuration and restrict access to monitoring endpoints. Read the official operational-metrics documentation.
Do not keep adding Workers without evidence. Identify whether the bottleneck is CPU, memory, search-engine writes, disk, or the external source; then change one variable and compare. Give every alert an owner and a next step. An alarming number with nobody assigned to act is another kind of silent failure.
Make the handover usable by another person.
By the end of this chapter, you should have a backup inventory, a timed restoration report, an upgrade exit plan, and a daily inspection checklist. When another colleague can identify where the data lives and whom to contact from the documentation alone, your operational work has become a team capability.
Want to apply these practices to other security tools? Continue with practical tools and security articles on SecTools.tw, and turn each experiment into experience you can use next time.
Finished this chapter?
Mark it when you are ready. Opening or scrolling through a chapter does not complete it automatically. You can undo your choice.
Progress is saved only in this browser. No account or automatic device sync. Clearing site data also removes progress.