Skip to content

Backing up and restoring Orchestrator

Everything Orchestrator knows lives inside the appliance: workflows, actions, configuration elements, plug-in settings, credentials, run history, and the PostgreSQL database that holds them. There’s no separate database server to back up any more, so you protect Orchestrator by protecting its VMs. This recipe shows how to do that for a single appliance and for a cluster, how to restore, and why you still want a second, content-only copy.

Getting ready

  • A standalone appliance (vco01.vmw.lab) or the three-node cluster from recipe 2.4.
  • Permission in the vSphere Client to take and revert snapshots of the appliance VMs, or a backup product that does image-based backups through vSphere Storage APIs – Data Protection (VADP).
  • A root shell on each node, for the cluster steps and the health checks: SSH in as vmware-system-user, then sudo su - (recipe 2.1).

How to do it

The steps below use vSphere snapshots, because every lab has them. A backup product follows the same rules: which VMs, in what order, and without memory.

Back up a single appliance

  1. In the vSphere Client, right-click the appliance VM (vco01) and select Snapshots > Take Snapshot.
  2. Name it something you’ll recognise later, such as before-2.7-heap-change.
  3. Clear Include virtual machine’s memory, then click Create.
Figure 2.11. A snapshot of the appliance, taken without memory.

Back up a three-node cluster

  1. Find the primary database node. On any node, list the PostgreSQL replication cluster. The line whose role is primary names the pod that holds the primary database:
root@vco01
kubectl -n prelude exec postgres-0 -- chpst -u postgres repmgr cluster show --terse --compact
  1. Map that pod to a node. The NODE column shows which appliance it runs on:
root@vco01
kubectl -n prelude get pods -o wide | grep postgres
Figure 2.12. Finding the node that holds the primary database.
  1. Snapshot the replicas first, then the primary. Take a snapshot without memory of each replica node, one after the other, and of the primary node last. In the lab, if vco02 holds the primary, the order is vco01, vco03, vco02.

Restore

  1. Single appliance: right-click the VM, select Snapshots > Manage Snapshots, pick the snapshot, and click Revert. Power the VM on if it was off.
  2. Cluster: power off all three nodes. Revert each one to the snapshot from the same backup run. Power on the primary node first, wait until its console shows the login prompt, then power on the two replicas.
  3. Check the result. When all pods are Running, check the server’s health:
root@vco01
kubectl -n prelude get pods
vracli vro info -d
  1. Log in to the Orchestrator Client and open Activity > Workflow Runs. Runs that were active at the moment of the backup come back in whatever state they were in. Cancel any you don’t want to resume.

  2. Delete the snapshots once you’ve finished the change they were protecting. A snapshot isn’t a backup: it lives on the same datastore as the VM, and it slows the VM down the longer you keep it.

Needs a lab check. Steps 4 to 8 follow the Aria Automation Orchestrator 8.12 and 8.16 page on backing up and restoring a cluster with snapshots. The 9.x equivalent couldn’t be found for this draft. Run a full back up and restore of the three-node lab cluster on 9.1.1 and confirm the order (replicas first, primary last, primary powered on first) and the health checks in step 9.

How it works

An Orchestrator appliance is a small Kubernetes cluster. Its PostgreSQL database, its configuration, and the Kubernetes state that ties them together all sit on the VM’s disks. A snapshot or an image-based backup copies those disks at one instant, so a restore puts back every one of them as it was at that instant.

You leave memory out because what’s in memory doesn’t help. The database writes everything it needs to disk, and a VM restored from a memory snapshot resumes with network connections and Kubernetes timers that are already stale. A restored VM boots cleanly instead, and PostgreSQL recovers from its own log, as it would after a power cut.

In a cluster, the database primary keeps writing while you snapshot the replicas. Taking the primary last means the primary is the newest copy. When you power it on first after a restore, it’s still the primary. The replicas then find it, see they’re behind, and catch up from it. Power the replicas on first, and one of them may decide the primary is dead and promote itself, leaving you with two databases that disagree.

Needs a lab check. The explanation of why the order matters is inferred from how repmgr failover works, not stated in the Orchestrator documentation. Check in the lab that after a restore in the documented order, repmgr cluster show reports one primary and two healthy standbys.
Back in vRO 5.5–7Back up the external database with its own tools, and use Control Center's Export Orchestrator Configuration to save the server settings to a file.
In Orchestrator 9.xBack up the whole VM. The database and the configuration are inside the appliance, and Control Center is gone.

There's more

Use a real backup product for real backups. Snapshots are for short changes, like the ones in this chapter. For daily backups, use an image-based backup product that supports VADP. Put all three cluster nodes in the same job so they’re copied at nearly the same moment, and restore all three from the same run. VCF’s own guidance for its other appliances is the same: back up every node of a cluster together, keep each backup for at least three days, and run one test backup before you trust the schedule.

Quiescing. The Orchestrator documentation asks only for snapshots without memory, and says nothing about quiescing. VCF’s own backup tables quiesce some appliances and not others. Until you’ve tested it, leave quiescing off for the Orchestrator VMs.

Needs a lab check. Confirm with your backup product whether it quiesces the Orchestrator VMs by default, and that a backup taken without quiescing restores cleanly on 9.1.1.

Fleet Management backups. VCF Operations Fleet Management can schedule backups of the VCF management components to an SFTP server. A standalone Orchestrator that you deployed yourself isn’t one of those components, so plan its backups separately.

Needs a lab check. Check in VCF Operations, under Build > Lifecycle > VCF Management > Backup & Restore, that a standalone Orchestrator appliance doesn’t appear as a backup target in 9.1.

The embedded Orchestrator is part of VCF Automation, so it’s protected by VCF Automation’s backups. You can’t snapshot it on its own.

Keep a content-only copy as well. A VM backup is all or nothing: to recover one workflow that someone deleted yesterday, you’d have to roll the whole server back. Export your own content regularly as a package, such as com.vcfguide.chapter2, or keep it in Git. Chapter 6 covers both. Then a single deleted workflow is a quick import, not a restore.

Restore to a new VM. If the original VM is gone, a backup product can restore it as a new VM. Keep the same name, IP address, and MAC address if you can. The appliance’s certificates, its Kubernetes cluster, and the authentication setup all expect its old identity.

Needs a lab check. Check whether an appliance restored with a new MAC address comes up cleanly on 9.1.1, or whether it needs further steps.

See also