The Nest uses a two-tier backup strategy: **Longhorn volume snapshots** for application configuration data (backed up to Backblaze B2 weekly), and **Restic** for Nextcloud user data (backed up daily). Media storage is not backed up.
Longhorn's built-in recurring job system handles snapshots of all PVCs labeled with `recurring-job.longhorn.io/source: "enabled"` and grouped under `app-config-group`.
- **Monitoring:** Prometheus and Grafana PVCs (labeled in HelmChart values)
### What Does NOT Get Backed Up
- **Media storage** (`/yarr/media`, `/yarr/downloads`) — NFS shares are not part of Longhorn and have no backups.
- **Transcoding scratch space** — DroppedNeedle's transcode PVC is excluded (it regenerates from source FLAC files).
### Configuration
Longhorn recurring jobs are defined in `longhorn/weekly-backups.yaml`:
### Backup Destination
Snapshots are pushed to Backblaze B2 using credentials stored in Vault and synced via the External Secrets Operator (`longhorn/backblaze-secrets.yaml`). The S3-compatible endpoint is configured through `AWS_ENDPOINTS`.
## Nextcloud User Data Backup
Nextcloud user data (files, contacts, calendars) is backed up separately using **Restic** to Backblaze B2. This runs as a Kubernetes CronJob in the `nextcloud` namespace.
### Schedule
- **Frequency:** Daily at 02:00 EST
- **Concurrency policy:** `Forbid` — if a previous run is still active, the new job is skipped.
### Retention Policy
| Period | Keep |
|--------|------|
| Daily | 7 days |
| Weekly | 4 weeks |
| Monthly | 12 months |
After retention enforcement, old snapshots are pruned automatically.
### How It Works
1. The CronJob spins up a Restic container (`restic/restic:0.16.4`).
2. Secrets (B2 credentials, repository URL, password) are injected from Vault via `ExternalSecret`.
3. If the B2 repository doesn't exist yet, Restic initializes it on first run.
4. The entire Nextcloud user data volume (`/data`) is backed up with verbose output.
5. Retention is enforced and old snapshots pruned.
### Configuration
Defined in `services/nextcloud/nextcloud-backups.yaml`:
### Secrets
Backblaze credentials are stored in Vault and synced into the cluster via ExternalSecrets (`services/nextcloud/nextcloud-backups.yaml`):