Backup and Restore
caution
Scale down or uninstall the Helm release before backing up or restoring PVC data to avoid corruption.
Backup PVC data
Annolive stores persistent data in Kubernetes PVCs:
| PVC | Data |
|---|---|
<release>-data | Media, static files, config |
<release>-postgres-postgres-data-0 | PostgreSQL |
<release>-rabbitmq-rabbitmq-data-0 | RabbitMQ |
List PVCs:
kubectl get pvc -n annolive
Option A — Snapshot (recommended)
Use your cloud provider or CSI driver snapshot feature on each PVC. This is the safest approach for production clusters.
Option B — Archive from a temporary pod
Mount the PVC in a temporary pod and copy data out. Example for the app data PVC:
kubectl run backup-helper --restart=Never -n annolive \
--image=busybox \
--overrides='{"spec":{"containers":[{"name":"backup","image":"busybox","command":["sleep","3600"],"volumeMounts":[{"name":"data","mountPath":"/data"}]}],"volumes":[{"name":"data","persistentVolumeClaim":{"claimName":"annolive-data"}}]}}'
kubectl cp annolive/backup-helper:/data ./annolive-data-backup
kubectl delete pod backup-helper -n annolive
Repeat for PostgreSQL and RabbitMQ PVCs if needed.
Also export Helm values used for the release:
helm get values annolive -n annolive > annolive-values-backup.yaml
Restore data
- Install the chart with
setupJob.enabled: falseif restoring an existing database. - Copy backup data into the corresponding PVCs using a temporary pod (reverse of the backup procedure).
- Run
helm upgradeso the init Job applies any pending migrations.
Do not re-run the setup Job when restoring an existing installation.
Uninstall without losing data
helm uninstall annolive -n annolive
PVCs remain in the namespace until explicitly deleted. Reinstall later with the same PVCs and setupJob.enabled: false.