Backup and restore
Back up the Instana® backend, agent data, and storage. Storage includes persistent volumes (PVs), persistent volume claims (PVCs), and configurations. Restore the backup as needed.
stanctl version during the backup procedure and the restore procedure.Self-Hosted Standard Edition 1.10.3 and earlier versions:
- For online (non–air‑gapped) installations, most
stanctllifecycle commands, such asstanctl upwill fail to run. - For air‑gapped installations, the
stanctlcommands continue to work.
Required action: Upgrade stanctl to 1.10.4 or later versions before you perform a lifecycle operation.
stanctl 1.10.3 or earlier versions, any workflow that stops services, such as a stanctl down command, before a backup, cannot complete because the subsequent stanctl up command fails. Upgrade stanctl to 1.10.4 or later versions before you start these steps. Preparing for backup
Before you back up the data, identify a new host on which you can restore the data from the current host.
- The new host must have the same operating system as the source host.
- The new host must meet the CPU and memory requirements.
- For a single-node cluster, see CPU and memory requirements.
- For a multi-node cluster, see CPU and memory requirements.
Complete the following steps on the new host:
-
Prepare your new host by completing the steps in the following sections:
- Kernel parameters
- For a single-node cluster, see Kernel parameters.
- For a multi-node cluster, see Kernel parameters.
- Packages and environment variables
- For a single-node cluster, see Packages and environment variables.
- For a multi-node cluster, see Packages and environment variables.
- Firewall rules
- For a single-node cluster, see Firewall rules.
- For a multi-node cluster, see Firewall rules.
- Kernel parameters
-
Stop the current cluster by running the following command on the current host:
stanctl down.
Backup of the cluster data store
Use the following command to take a backup of the cluster. In a multi-node cluster, you
must run this command on node0 (instana-0). The command creates a
stanctl-backup-<timestamp>.tar.gz file in the current directory. To specify
another location, use the --output-dir flag with the command.
stanctl cluster backup
Creating a snapshot of the disks
Take snapshots of all the disks that you mounted on the current host.
For more information about how to take snapshots, refer to the documentation of your storage system or cloud provider.
Restoring data to a new Instana host
Complete the following steps on your new host:
-
Create disks from the snapshots and mount them to the new host. Create one disk at a time from the snapshots to make sure to restore and mount the correct disk to the correct file system.
- For a single-node cluster, complete the following steps:
- For a three-node cluster, complete the following steps:
- For a five-node cluster, complete the following steps:
-
Copy the Stanctl backup archive (
stanctl-backup-<timestamp>.tar.gz) file to the new host. In a multi-node cluster, you must copy the archive file to node0 (instana-0). -
Restore data from the
stanctl-backup-<timestamp>.tar.gzto the new host.- For a single-node cluster, run the following command:
stanctl cluster restore -f <path/to/stanctl-backup-<timestamp>.tar.gz> - For a multi-node cluster, run the following command on node0 (
instana-0):stanctl cluster restore --multi-node-enable --multi-node-ips=<node0IPaddress,node1IPaddress,node2IPaddress> -f <path/to/stanctl-backup-<timestamp>.tar.gz>
- For a single-node cluster, run the following command:
-
In the DNS settings configuration, be sure to replace the public IP address of your host with the public IP address of the new host.
- For a single-node cluster, see DNS settings.
- For a multi-node cluster, see DNS settings.
-
Install the Instana backend and data stores by using the following command. The command uses existing configurations that are located in the
$HOME/.stanctl/instana.yamlfile for the installation.- For a single-node cluster:
stanctl up - For a multi-node cluster:
stanctl up --multi-node-enable
- For a single-node cluster:
Configuration-only backup and restore
You can use a configuration‑only backup and restore workflow when disk snapshots are not practical or when you need to preserve configuration before an upgrade. This workflow uses stanctl dump config-data and stanctl migrate to export and restore configuration data for Self-Hosted Standard Edition. It also fully supports air‑gapped environments.
Use this workflow in the following situations:
- You cannot create datastore or disk snapshots.
- You want to preserve configuration before an upgrade.
- You need to save tenant and application configuration without including analytics data.
Use the snapshot‑based backup and restore workflow when you need a complete system backup that includes metrics and analytics data.
The configuration backup includes all PostgreSQL-backed configuration data, including:
- Custom dashboards
- Alerts
- Users
- Application perspectives
- End‑user monitoring, which tracks websites (EUM)
- EUM mobile applications
- Events
- Tenant settings
- Unit settings
- Other configuration data stored in PostgreSQL
Restore requirements and limitations
You must restore the configuration backup to a new Self-Hosted Standard Edition system. The workflow does not support
importing configuration data into an existing running system. For more information about the command
details and examples for stanctl dump config-data and stanctl
migrate, see Standard Edition
migration.