How Backups Work

Storage-level snapshots combined with database dumps

VolumeSnapshot

Filesystem backups use Kubernetes VolumeSnapshots via the Linstor/Piraeus snapshot class. Storage-level snapshots are instant and consistent, capturing the entire PVC state.

  • Instant filesystem snapshot
  • Storage-level consistency
  • Linstor/DRBD backed

Database Dump

MariaDB databases are backed up with mysqldump and compressed with zstd. Stored alongside the VolumeSnapshot for complete domain recovery.

  • mysqldump + zstd compression
  • Per-domain database backup
  • Downloadable as SQL file

Nightly Automation

A Kubernetes CronJob triggers backups for all domains at 2 AM UTC daily. A cleanup job at 4 AM removes backups older than 7 days. Fully automated, zero maintenance.

  • 2 AM UTC nightly backup
  • 7-day retention policy
  • Automatic cleanup at 4 AM

Backup Flow

1

Trigger

Manual from dashboard or automated by nightly CronJob. Creates a Backup CR.

2

Snapshot

Operator creates a VolumeSnapshot of the domain's PVC. Instant, storage-level copy.

3

Database

K8s Job runs mysqldump with zstd compression. Stores the dump in the backup PVC.

4

Status

Backup CR is updated with phase, snapshot name, size, and retention expiry date.

Restore Flow

1

Scale Down

Deployment scaled to zero replicas to prevent data corruption during restore.

2

Restore PVC

Existing PVC deleted and recreated from the VolumeSnapshot. Full filesystem restore.

3

Restore DB

Database dump decompressed and restored into MariaDB. Complete data recovery.

4

Scale Up

Deployment scaled back up. Domain resumes normal operation with restored data.

Restore Options

Multiple ways to recover your data

Snapshot Restore

Restore from any available VolumeSnapshot. Complete filesystem and database restoration to any backup point within the 7-day retention window.

Upload Restore

Upload a tar.gz archive to restore files. Useful for importing data from external sources or restoring from manual backups taken outside KubePanel.

Download Backup

Download backup archives (tar.gz) and database dumps (SQL) for offline storage, migration, or external processing. Keep copies wherever you want.

Never Lose Data Again

Automated nightly backups with 7-day retention. One-click restore from any snapshot.