Skip to main content
A backup you have never restored is a hope, not a plan. This tutorial runs the whole loop on a small throwaway Stack, so nothing you care about is at risk: you write a known file to a volume, protect the Stack, take a restore point, break the data, restore it in place, then clone the Stack with its data to a second cluster. After each restore you read the file back and see that it is the one you saved. You end up knowing every step of a restore on your own clusters, with the evidence of a passing drill. It takes about 30 minutes. Backups and restore points is the reference for every option used here.

Before you start

  • A backup vault that reads Ready on Infrastructure → Backups and storage. See Backups and restore points.
  • Two clusters connected to Ankra and online: my-cluster, where the drill runs, and drill-target, where the clone goes. Each needs a default StorageClass. A cluster whose menu shows Set up backups instead of Backups does not have backups turned on; see Not enabled yet?.
  • Permissions: backups.manage to protect the Stack and backups.operate to take and restore restore points (organisation admins hold both), and a role that may create and deploy Stacks. See Permissions.
  • The ankra CLI, signed in, to read and write the test file.

1. Create the drill Stack

The Stack holds a namespace, a 1 GiB volume and a small pod that mounts it.
1

Start the draft

Open Infrastructure → Clusters → <your cluster>, then Stacks under Technical details. Click Create a stack, keep Compose a stack, enter drill as the Stack name, and click Start the draft.
2

Add the three manifests

Click Add → Manifest three times, with these Resource name and Manifest source values, clicking Add to draft after each:drill-namespace:
drill-data:
drill-app:
3

Order and deploy

Select drill-data, open Parents and tick drill-namespace under Depends on. Select drill-app and tick drill-data. Click Review changes, then Create and deploy stack.The editor reads “Deployment accepted. Follow the operation for its outcome.”
4

Write the proof

Find the pod, then write a known line to the volume:
The last command prints saved-before-the-drill.

2. Protect the Stack

1

Open the Stack's backups

Open Infrastructure → Clusters → <your cluster> → Backups. In the Protection table, the drill row reads Unprotected. Click drill.The page is now drill backups, with Backup policy and Restore points.
2

Configure protection

Click Configure protection. Choose your Backup vault, keep daily as the Schedule, and enter drill/data under Persistent volumes to include. Volumes not listed there are not backed up. Type drill into Type drill to confirm and click Save policy.The page reads Backup policy saved, and Backup policy names your vault and drill/data.

3. Take a restore point

1

Take it

Click Take restore point, enter drill as the Note (optional), type drill to confirm and click Take restore point.The page reads “Taking a restore point of drill. It shows in Restore points below when it is ready.” The new row under Restore points reads Being taken, then Complete.
2

Read what it carries

Click the restore point. Selected restore point lists what it carries: the data volume must be there. Read Left out of this restore point: anything listed there is not in the copy, with the reason.
From the CLI, the same restore point:

4. Break the data

Overwrite the proof, as a bad deploy or a mistaken command would:
It prints broken.

5. Restore in place

A restore in place removes the Stack’s current volumes before it writes the restore point’s, so anything written since the restore point was taken is gone from the cluster: here, the line broken. Before it removes anything, Ankra takes a safety copy of the current data as a new restore point, and refuses the restore if it cannot.
1

Restore

Click the Complete restore point, then Restore in place. Type drill into Type drill to confirm and click Replace the data.The page reads “Restoring drill. The stack’s apps stop while their data is replaced, then start again.” The progress reads Running, then Finished.
2

Check the data is back

The pod was replaced, so look up its new name, then read the file:
It prints saved-before-the-drill. The restore worked.

6. Clone the Stack with its data

The second half of the drill is the disaster case: the data comes back on another cluster.
1

Clone with data

On the drill backups page, click Clone with data. Choose drill-target as the Target cluster, choose Take a new restore point now as the Data source, type drill to confirm and click Clone with data. Do not choose Use the newest complete restore point here: the newest one is the safety copy the restore took, which holds the line broken.The progress shows Draft created on drill-target (“Not deployed yet”), then Copying the data until it reads Finished, then Deploy the draft: “Ready: open the draft and deploy it”. The source Stack keeps running and is not changed.
2

Deploy the copy

Open Infrastructure → Clusters and the cluster drill-target, then Stacks under Technical details, and open drill. Click Review changes, then Create and deploy stack.
3

Check the data on the copy

It prints saved-before-the-drill: the data reached the other cluster.
From the CLI, the clone is ankra cluster stacks clone drill --to drill-target --with-data; see Clone Stacks.

Verify

You have now seen the same line come back twice: in place on my-cluster, and on drill-target. To keep the evidence, list the restore points and the runs that moved the data:

Clean up

  1. On drill backups, click Stop future backups, type drill and click Stop backups. Restore points already taken stay in the vault until you delete them.
  2. Delete the drill Stack on both clusters: open it in the stack editor and choose Delete stack from More, or from the CLI:

What can go wrong

Next steps