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.

Important:
Make sure to use the same stanctl version during the backup procedure and the restore procedure.
Attention:

Self-Hosted Standard Edition 1.10.3 and earlier versions:

  • For online (non–air‑gapped) installations, most stanctl lifecycle commands, such as stanctl up will fail to run.
  • For air‑gapped installations, the stanctl commands continue to work.

Required action: Upgrade stanctl to 1.10.4 or later versions before you perform a lifecycle operation.

Example: On online deployments that run 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.

Complete the following steps on the new host:

  1. Prepare your new host by completing the steps in the following sections:

  2. Add Instana repository.

  3. Installing stanctl command-line tool.

  4. 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:

  1. 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.

  2. 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).

  3. Restore data from the stanctl-backup-<timestamp>.tar.gz to 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>
       
  4. 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.

  5. 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.yaml file for the installation.

    • For a single-node cluster: stanctl up
    • For a multi-node cluster: stanctl up --multi-node-enable

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
Note:
The configuration backup does not include metrics or analytics data.

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.