When deploying Part-DB via Docker and using the web interface to trigger a backup, an alert appears stating that var/backups/ is not a persistent volume. Following the documentation/alert suggestion, when I try to mount a persistent volume for backups, the backup process fails completely with a Permission denied error.
To Reproduce
Add a persistent volume for backups in docker-compose.yml mapped to the default internal path:
YAML
volumes:
- uploads:/var/www/html/uploads
- public_media:/var/www/html/public/media
- db:/var/www/html/var/db
- backups:/var/www/html/var/backups
Recreate the containers
Log into the Part-DB Web UI and trigger a Full Backup.
The system throws a critical console error during the partdb:backup command execution.
Error Log
Backup failed: Create backup failed:
[2026-06-15T07:36:34.690097+00:00] console.CRITICAL: Error thrown while running command "partdb:backup --full --overwrite '/var/www/html/var/backups/manual-v2.12.2-2026-06-15-093633.zip'".
Message: "fopen(/var/www/html/var/backups/manual-v2.12.2-2026-06-15-093633.zip.temp6a2fab82a7840): Failed to open stream: Permission denied"
{"exception":"[object] (PhpZip\\Exception\\InvalidArgumentException(code: 2): fopen(/var/www/html/var/backups/manual-v2.12.2-2026-06-15-093633.zip.temp6a2fab82a7840): Failed to open stream: Permission denied at /var/www/html/vendor/nelexa/zip/src/ZipFile.php:1488)"}
Expected behavior
The backup directory should have the correct default permissions assigned to the www-data user inside the container image so that persistent volume mapping via Docker Compose works seamlessly out of the box without changing permissions on the host system.
Questions regarding configuration:
What is the officially recommended way to persistent-map the var/backups directory in docker-compose.yml to prevent this warning and avoid Permission denied issues?
Should it be mapped as - backups:/var/www/html/var/backups?
Or should it be mapped outside the web server root, like - backups:/var/backups?
Desktop / Server Environment:
Part-DB Version: v2.12.2
Deployment: Docker Compose
Base OS: Linux / QNAP NAS Container Station
When deploying Part-DB via Docker and using the web interface to trigger a backup, an alert appears stating that var/backups/ is not a persistent volume. Following the documentation/alert suggestion, when I try to mount a persistent volume for backups, the backup process fails completely with a Permission denied error.
To Reproduce
Error Log
Expected behavior
The backup directory should have the correct default permissions assigned to the www-data user inside the container image so that persistent volume mapping via Docker Compose works seamlessly out of the box without changing permissions on the host system.
Questions regarding configuration:
What is the officially recommended way to persistent-map the var/backups directory in docker-compose.yml to prevent this warning and avoid Permission denied issues?
Desktop / Server Environment: