Backup and restore

When the underlying file system supports consistent snapshots, Instana backup and restore can be done by using this low-level mechanism, without the requirement of any components. From a configuration perspective, it is the easiest method. Before you make a snapshot of the Instana data, you need to run the command instana stop, which stops the databases and flushes all data in flight to disk. Creating a snapshot with running databases involves a risk of getting a snapshot of an inconsistent state.

Copying files

Before you copy files from the file system, you need to stop Instana by running the command instana stop. To reduce downtime, a combination of copy and Rsync commands can work. This way around, continuous backup can be implemented for full corresponding data.

This option can be customer-specific, but is achievable by using regular UNIX/Linux tools.

See the following example procedure:

instana stop
tar -cf ./data_backup/data.tar /mnt/data/
tar -cf ./data_backup/metric.tar /mnt/metric/
tar -cf ./data_backup/traces.tar /mnt/traces/
cp settings.hcl ./data_backup/
instana start

Restoring Instana

This restore procedure has different use cases. It can be used as a regular restore from a snapshot in an emergency case or used to restore EC2 instances inside auto-scaling groups for an automated restore after termination.

Restoring Instana on an empty instance

The restore procedure consists of the following steps:

  1. Set up the instana-console repository.
  2. Install Docker.
  3. Install instana-console in the same version as on the original instance.
    • For Ubuntu/Debian, check the available versions by running the following command:
      apt-cache policy instana-console
      
      Then, run the command as follows:
      apt install instana-console=173-5
      
    • For Red Hat/CentOS, check the available versions by running the following command:
      yum --showduplicates list instana-console
      
      Then, run the command as follows:
      yum install instana-console-173-5
      
  4. Import the data backups to the mount paths of the settings.hcl file.
  5. Restore Instana by running the following command:
    instana restore -f <path-to-settings.hcl>