Backing up and restoring
Back up and restore Instana backend and agent data, persistent volumes (PVs), persistent volume claims (PVCs), and Instana configurations.
You must install stanctl
version 1.5.0 or later to use the commands that are mentioned in this backup and restore procedure. Be sure to use the same stanctl
version during the backup procedure and the restore procedure.
- Preparing for backup
- Backing up the cluster data store
- Creating a snapshot of the disks
- Restoring data to a new Instana host
Preparing for backup
Before you start backing 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 these 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
Backing up the cluster data store
Back up the cluster by using the following command. 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 these 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 be sure to restore and mount the correct disk to the correct file system.
- For a single-node cluster, complete the following steps:
- For a multi-node cluster, complete the following steps:
-
Copy the
stanctl-backup-<timestamp>.tar.gz
archive 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.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>
- 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
stanctl up
command. The command uses existing configurations that are located in the$HOME/.stanctl/instana.yaml
file for the installation.stanctl up