Backups
A database backup is created on demand with vxl db backup. The daemon writes the dump locally and, when an S3-compatible target is configured, uploads a copy.
[backup] schedule fields, but the daemon does not run a backup schedule. Usevxl db backup from cron or your own scheduler until that path is wired.Create a backup
$ vxl db backup shop-db --server prodList the backups for that database:
$ vxl db backups shop-db --server prodEach entry includes a backup id. Keep the id for a restore. PostgreSQL backups use the custom pg_dump format, stored as .dump.gz after gzip compression. The restore path streams decompression to a temporary .dump file before running pg_restore. Select backups by id rather than by filename.
Restore a backup
$ vxl db restore shop-db --backup <backup-id> --yes --server prodStore a copy in S3-compatible storage
Set the backup target in /etc/voxeltron/voxeltron.toml. The local write always happens; the remote upload is added when the target is S3:
[backup]
enabled = true
[backup.target]
type = "s3"
bucket = "my-voxeltron-backups"
region = "eu-west-1"
prefix = "voxeltron"
endpoint = "https://s3.eu-west-1.amazonaws.com"Omit endpoint for AWS S3. Set it for an S3-compatible service such as MinIO or Wasabi. Those services usually require path-style addressing, which Voxeltron enables when an endpoint is set.
Credentials come from the daemon process environment:AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. Put them in a root-owned environment file and load it with a systemd drop-in:
$ sudo install -m 0600 /dev/null /etc/voxeltron/backup.env
$ sudo systemctl edit voxeltrond[Service]
EnvironmentFile=/etc/voxeltron/backup.envThen restart and take a backup:
$ sudo systemctl restart voxeltrond
$ vxl db backup shop-db --server prodvxl db backups includes the remote copies when the target is configured. A failed upload is reported as an error; the local dump is still available.
What v0.1 does not do
- No scheduled backups and no automatic retention.
- No application-level encryption of backup files. Use encrypted storage or a client-side encryption step if the dump contains sensitive data.
- No point-in-time recovery. A restore returns the database to the selected dump.
The configuration accepts local, s3, r2 andgcs targets. Database backup uploads in v0.1 use the local ands3 paths.
Back up the daemon state
Database dumps are separate from daemon state. Stop the daemon before copying its state if you need a consistent file copy:
$ sudo systemctl stop voxeltrond
$ sudo cp /var/lib/voxeltron/voxeltron.db /var/lib/voxeltron/voxeltron.db.bak
$ sudo systemctl start voxeltrondBack up /etc/voxeltron as well. It contains the configuration and the operator token.