Backup and restore
A Porto backup is a portable archive (compressed tar with one JSONL file per table and the uploaded files, still encrypted): the same format for SQLite and PostgreSQL, so a backup taken on one database restores on the other. Raw sensor readings are not included.
Taking a backup
Section titled “Taking a backup”porto backup --out /data/porto-2026-11-10.porto-backupWith Docker:
docker compose -f deploy/docker-compose.yml exec porto /porto backup --out /data/porto-$(date +%F).porto-backupThe file lands in the data volume: copy it off the server (another disk, another site). Schedule the backup from the
host’s cron or a systemd timer.
Restoring
Section titled “Restoring”-
Prepare an installation with the same Porto version as the backup and the same
PORTO_SECRET_KEY. -
Restore:
Finestra del terminale porto restore --in porto-2026-11-10.porto-backup # on an empty databaseporto restore --in porto-2026-11-10.porto-backup --force # wipe the database first -
Start the server and sign in again: sessions are not included.
Restore refuses a database that already holds data (without --force) and an archive whose schema version differs
from the database. To bring a backup to a newer version, restore it with its own version, then update
(Updates).
Desktop app
Section titled “Desktop app”The desktop app takes backups in the same format by itself: one a day, one at every close, manual ones and one before every restore. It keeps 14 daily and 5 close backups; manual ones are never deleted. Restore starts from the panel. See Desktop app.
Porto is developed by Coste360 SRL. Source available under the BSL 1.1; the Porto trademark is not covered by the licence.