Skip to main content

Longhorn

Longhorn is a cloud-native distributed block storage system for Kubernetes. It supports S3-compatible storage as a Backup Target for snapshot exports.

Configure a Backup Target

  1. Open the Longhorn UI (kubectl port-forward -n longhorn-system service/longhorn-frontend 8080:80).
  2. Settings → General → Backup Target.
  3. Set the value to:
s3://my-longhorn-bucket@auto/
  1. Backup Target Credential Secret — create a Kubernetes Secret in the longhorn-system namespace:
apiVersion: v1
kind: Secret
metadata:
name: filebase-credentials
namespace: longhorn-system
type: Opaque
stringData:
AWS_ACCESS_KEY_ID: YOUR_FILEBASE_KEY
AWS_SECRET_ACCESS_KEY: YOUR_FILEBASE_SECRET
AWS_ENDPOINTS: https://s3.filebase.io
  1. Reference it in the Backup Target Credential Secret field: filebase-credentials.

Take a backup

In the Longhorn UI, navigate to a volume → Take Backup. Longhorn copies the volume's blocks to Filebase under a per-volume prefix.

Scheduled snapshots

Longhorn supports cron-style snapshot scheduling. Combine periodic snapshots (kept locally) with periodic backups (exported to Filebase) for layered protection.

What's next

  • Velero
  • CSI-S3 — for filesystem-mode access instead of block backup