Skip to main content

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:

PVCData
<release>-dataMedia, static files, config
<release>-postgres-postgres-data-0PostgreSQL
<release>-rabbitmq-rabbitmq-data-0RabbitMQ

List PVCs:

kubectl get pvc -n annolive

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​

  1. Install the chart with setupJob.enabled: false if restoring an existing database.
  2. Copy backup data into the corresponding PVCs using a temporary pod (reverse of the backup procedure).
  3. Run helm upgrade so 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.