Backups & restore
LabPod backs up its SQLite database - workspaces, users, templates, policies, audit logs, and
settings. User files in /home/<user>/work are not included in the database backup;
back those up with your host-level backup tool separately.
Daily backup timer
Section titled “Daily backup timer”The install script registers labpod-backup.timer, which runs once a day with a randomized
delay and calls:
labpod admin backup --dir /var/lib/labpod/backups --retention 14This creates a timestamped snapshot (labpod-YYYYMMDDTHHMMSSZ.db) and keeps the 14 most
recent, pruning older ones.
# Inspect the timersudo systemctl list-timers labpod-backup.timer
# Check recent backup logssudo journalctl -u labpod-backup.service --since today
# List existing backupsls -lah /var/lib/labpod/backups/# Run these as root# Inspect the timersystemctl list-timers labpod-backup.timer
# Check recent backup logsjournalctl -u labpod-backup.service --since today
# List existing backupsls -lah /var/lib/labpod/backups/Force a snapshot now:
sudo systemctl start labpod-backup.service# Run these as rootsystemctl start labpod-backup.serviceTune retention or directory
Section titled “Tune retention or directory”Use a systemd drop-in to override the defaults:
sudo systemctl edit labpod-backup.service# Run these as rootsystemctl edit labpod-backup.serviceIn the editor, paste:
[Service]ExecStart=ExecStart=/usr/local/bin/labpod admin backup --dir /var/lib/labpod/backups --retention 30sudo systemctl daemon-reload# Run these as rootsystemctl daemon-reloadAd-hoc backup
Section titled “Ad-hoc backup”Write a self-contained snapshot to an explicit path:
sudo labpod admin --db /var/lib/labpod/labpod.db backup --out /tmp/labpod-adhoc.db# Run these as rootlabpod admin --db /var/lib/labpod/labpod.db backup --out /tmp/labpod-adhoc.dbThis fails fast if the database file doesn’t exist (no silent empty-DB creation).
Restore
Section titled “Restore”Restore requires stopping the service because SQLite refuses a hot copy when the WAL sidecar
(.db-wal, .db-shm) is in use.
sudo systemctl stop labpod
sudo labpod admin --db /var/lib/labpod/labpod.db restore \ /var/lib/labpod/backups/labpod-20260517T030000Z.db
sudo systemctl start labpod# Run these as rootsystemctl stop labpod
labpod admin --db /var/lib/labpod/labpod.db restore \ /var/lib/labpod/backups/labpod-20260517T030000Z.db
systemctl start labpodrestore will prompt for confirmation unless you pass --yes.
What the backup contains
Section titled “What the backup contains”The backup is a complete snapshot of the LabPod database:
- Users, roles, and hashed passwords
- Workspace definitions and GPU allocations
- Templates and their port/env configuration
- Resource policies and system settings
- Session records and audit logs
- Usage samples and rollups
Not included: workspace container layers, user home directories, uploaded files. The workspace container state (running kernels, training checkpoints) is also not captured - only the workspace metadata.