Skip to content

Backups and restore

Every night at INGLE_BACKUP_AT (03:00 by default, household time) Ingle writes ingle-YYYYMMDD-HHMMSS.tar.gz into the backup folder, and keeps the newest INGLE_BACKUP_KEEP (14). Each one holds:

  • ingle.db: a consistent snapshot of the database, taken while Ingle keeps running.
  • photos/ and avatars/: everything uploaded in admin.

The photos folder isn’t included: it’s your own files.

Backups from before the rename (domus-….tar.gz) still count towards the number kept, and restore the same way. They hold a domus.db, which Ingle opens when there’s no ingle.db.

The backups go to BACKUP_PATH on the host (./backups next to compose.yaml by default).

Take one now, for example before an upgrade:

Terminal window
docker compose exec ingle /ingle backup

To restore, pick a backup, then:

Terminal window
docker compose stop ingle
docker run --rm -v domus_domus-data:/data -v "$PWD/backups:/backups:ro" alpine sh -c '
rm -rf /data/ingle.db* /data/domus.db* /data/photos /data/avatars /data/photo-cache &&
tar -xzf /backups/ingle-20261104-030000.tar.gz -C /data &&
chown -R 65532:65532 /data'
docker compose start ingle

The -wal and -shm files belong to the old database, so they have to go too. The data volume is called domus_domus-data for every install, from before Ingle was renamed, so upgrades keep their data.

The backups go to /var/lib/ingle/backups.

Take one now, with the service’s own user and settings:

Terminal window
sudo systemctl start ingle-backup
journalctl -u ingle-backup -n 3 # shows the file it wrote

To restore, pick a backup, then:

Terminal window
sudo systemctl stop ingle
sudo rm -rf /var/lib/ingle/ingle.db* /var/lib/ingle/photos /var/lib/ingle/avatars /var/lib/ingle/photo-cache
sudo tar -xzf /var/lib/ingle/backups/ingle-20261104-030000.tar.gz -C /var/lib/ingle
sudo chown -R ingle:ingle /var/lib/ingle
sudo systemctl start ingle

To keep backups somewhere else, such as /mnt/backup/ingle:

  1. sudo mkdir -p /mnt/backup/ingle && sudo chown ingle:ingle /mnt/backup/ingle

  2. Set INGLE_BACKUP_DIR=/mnt/backup/ingle in /etc/ingle/ingle.env.

  3. Let the service write there: sudo systemctl edit ingle and sudo systemctl edit ingle-backup, adding to each:

    [Service]
    ReadWritePaths=/mnt/backup/ingle
  4. sudo systemctl restart ingle

ingle backup reads the same settings as the server (INGLE_DB_PATH, INGLE_BACKUP_DIR, INGLE_BACKUP_KEEP), writes one backup and prints its path. Run it as the user that owns the data, so the files it creates stay readable by the server.