Contact Us 1-800-596-4880

Back up and Restore Runtime Fabric

To preserve applications in the event of system failure, confirm that Runtime Fabric is automatically backed up. When scheduling backups, follow best practices by configuring hourly backups. Store your backup archive on external storage outside the Runtime Fabric cluster.

Data about the state of Runtime Fabric is distributed across the Kubernetes cluster. Use the following procedures to back up and restore the required state necessary for all deployed applications, management services, and their configurations.

Performing a backup per node, such as via a VM snapshot, is not supported.

Configuration changes to deployed applications and management services made after a back up are not restored.

For Runtime Fabric on VMs / Bare Metal, the backup and restore process includes backing up and restoring appliance-related custom resources such as logforwarder and smtp. The backup and restore process does not include backing up metrics data stored in the influxdb that is generated by the applications.

Prerequisites for Backing Up Runtime Fabric

Before performing a backup or restore operation:

  • Verify that Runtime Fabric is installed and running successfully.

  • Verify that rtfctl command-line tool is upgraded to version 0.3.102 or later. Verify the version by running rtfctl version on any Runtime Fabric node.

  • If you are using Runtime Fabric on VMs / Bare Metal, verify that Runtime Fabric is upgraded to version 1.1.1581474166 or later. See Anypoint Runtime Fabric Installer Release Notes.

Create a Backup

To create a backup run the following command:

./rtfctl backup <path_to_backup_file>

This command creates an archive of the current system state in <path_to_backup_file>, which can be any path in the file system that you have write access to, for example: /opt/anypoint/runtimefabric/backup.tar.gz.

  • For Runtime Fabric on VMs / Bare Metal, the rtfctl binary is in directory /opt/anypoint/runtimefabric/. Confirm that you run the backup command on a controller node in the cluster as a privileged user. To use the archive for restoring later, copy the archive file to secure storage on a different machine that is not part of Runtime Fabric.

    The following command, for example, uses scp to copy the archive to another drive:

    scp your_username@remotehost:/opt/anypoint/runtimefabric/backup.tar.gz /backup-path/to-restore.tar.gz
  • For Runtime Fabric on Self-Managed Kubernetes, confirm that the rtfctl binary is present in the current directory and that the Kubernetes (kubectl) context is set to the intended backup cluster.

Restore a Cluster

Runtime Fabric provides two target options when restoring a cluster from a backup:

  • Use an existing Runtime Fabric cluster.

  • Create a new Kubernetes cluster with the same configuration as the backed up cluster. This includes the same number of servers, disks, etc.

To create a new Kubernetes cluster on VMs / Bare Metal without Runtime Fabric being installed, run the Runtime Fabric installer script(s) without providing the fabric activation data.

When restoring on an existing Runtime Fabric cluster, the appliance version must be the same as the Runtime Fabric used to create the backup archive. You cannot restore from an older version to a newer version of Runtime Fabric running on the cluster.

  1. Copy the backup archive file and make sure it is available to rtfctl.

    • For Runtime Fabric on VMs / Bare Metal, copy the compressed backup archive file to a directory in a controller node of the environment to be restored. For example, you can transfer this file securely via the following command:

      scp /backup-path/to-restore.tar.gz your_username@remotehost:/opt/anypoint/runtimefabric/
  2. To restore on a newly created cluster:

    1. Scale down all Runtime Fabric components on the original, backed-up cluster.

    2. Confirm your Kubernetes (kubectl) context is set to the backed up cluster.

    3. Run the following command:

      kubectl scale --replicas=0 -n rtf deployment.apps/agent
  3. Restore the cluster.

    To restore the cluster from the backup archive, run the following command:

    ./rtfctl restore <path_to_backup_file>

    This process may require several minutes to complete.

For Runtime Fabric on Self-Managed Kubernetes, confirm the rtfctl binary is present in the current directory and the Kubernetes (kubectl) context is set to the cluster you are restoring to.