Backup & restore
What to back up
Section titled “What to back up”Only the storage/ directory. That’s it.
It holds the SQLite database (storage/database/dreeve.db) and the images and files the app generates
(storage/files/). Your original .fit, .tcx and .gpx files are stored inside the database, so there is
nothing else to keep separately.
Your docker-compose.yml and .env are configuration, not data, but keeping a copy makes a restore quicker.
Make a backup
Section titled “Make a backup”Run the backup command:
> docker compose exec app bin/console app:backup:createIt writes one dreeve-<date>-<time>.tar.zst file to the backups/ directory, holding a snapshot of the database
and the files in storage/ (logs excluded). It keeps the 7 most recent backups and deletes older ones.
Schedule nightly backups
Section titled “Schedule nightly backups”To make a backup every night, enable the Local backup task in Admin panel → Settings → Daemon.
Mount the backups directory
Section titled “Mount the backups directory”Backups are written to /var/www/backups inside the container.
Add ./backups:/var/www/backups to the app and daemon services, see Installation.
Restore a backup
Section titled “Restore a backup”Stop Dreeve, restore the backup in a one-off container and start it again:
> docker compose stop app daemon> docker compose run --rm app bin/console app:backup:restore dreeve-2026-01-01-030000.tar.zst> docker compose up -dPass the file name of a backup in the backups/ directory. The command asks for confirmation first.
The restore replaces the database and overwrites the files in storage/ with the ones from the backup.
Logs aren’t part of a backup and aren’t touched.
Move to a new server
Section titled “Move to a new server”Install Dreeve on the new server first and start it once with docker compose up -d. Then copy
the backup into its backups/ directory and follow the steps in Restore a backup.