Back up Telark
What Telark stores, how to back it up, and how to restore it into a new cluster.
Telark does not back itself up. Choose the tool; this page lists what to capture and the restore order.
What to back up
| Data | Where | Why it matters |
|---|---|---|
Custom resources (telark.io) | etcd, in the telark namespace | Applications and their history, protection plans, settings, users, groups, roles, passkeys |
Snapshot volume telark-exporter-snapshots-pvc | Mounted by the exporter at /snapshots | Rollback targets: /snapshots/apps/<app>/<namespace>/V<generation>.json |
Reports volume telark-exporter-reports-pvc | Mounted by the exporter at /reports | Protection plan reports and violation ledgers, the only record of a finished plan |
Not worth backing up: Redis (in-app notifications, insights, queues and locks; losing it clears the notification feed and current insights) and the Kyverno policies of active plans, which Telark redeploys from the plans.
The snapshot volume holds Secret manifests. Encrypt and restrict its backups accordingly.
1. Back up the volumes
With Velero and CSI volume snapshots, a schedule over the whole namespace captures both volumes and the custom resources in one backup:
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: telark
namespace: velero
spec:
schedule: "0 */6 * * *"
template:
includedNamespaces:
- telark
snapshotVolumes: true
ttl: 720hWithout CSI snapshots, use Velero's file-system backup, or your cloud's volume snapshots (aws ec2 create-snapshot, gcloud compute disks snapshot, az snapshot create).
2. Export the custom resources
For a portable copy, or to inspect objects outside Velero:
for r in applications protectionplans telarkconfigs categories \
users groups accessroles passkeys sessions; do
kubectl get "$r.telark.io" -n telark -o yaml > "$r.yaml"
doneUse the fully qualified names. A plain kubectl get applications may return Argo CD's resources instead.
Restore into a new cluster
-
Install Telark as for a fresh cluster (Install Telark for production), with the same flags.
-
Restore the snapshot and report volumes, then restart the exporter so it mounts them:
kubectl rollout restart -n telark deploy/telark-exporter-service -
Restore the custom resources in this order:
Category,AccessRole,Group,User,TelarkConfig,Application,ProtectionPlan,Passkey. SkipSession; people sign in again.
Two things get in the way of a plain kubectl apply:
- The CRD write guard rejects writes to
telark.iofrom anyone but Telark's service accounts. Run the restore as an identity listed inapp.crdGuard.extraAllowedUsers. Application,ProtectionPlanandTelarkConfigkeep snapshot and rollback records, plan phases and approvals in.status, whichkubectl applydoes not write. Only a tool that restores the status subresource brings it back, for example a Velero restore withrestoreStatuscovering thetelark.ioresources.
Active plans redeploy their Kyverno policies on the next controller tick.
Test the restore
Backups you have never restored are a guess. Restore into a sandbox cluster from time to time and check that applications show their history and that a rollback to a restored snapshot succeeds.