Skip to content

Live Backups

SelfHosted Nostos has a built-in backup service that creates verified .nostos archives. The official container stores those archives under:

/data/backups

A backup can include both the relational library data and stored book/media files.

Do not replace this with a raw copy of a live nostos.db file. A plain file copy is not a reliable application-level backup while SQLite may be writing.

Settings → Backups & data has everything for local backups:

  • Back up now makes a backup straight away.
  • Automatic backup turns scheduled backups on, with Backup frequency and Backups to keep.
  • Include book files adds EPUB, PDF and audio files to each backup. The archives get much larger, but you can recover the whole library from them.
  • Backup history lists each backup with Download archive, Restore and Delete backup.
  • Scan for Backups, under Import from disk, adds .nostos files you copied into the backups folder (/data/backups in the official container) to the history, so you can restore them.

Scheduled backups are disabled by default in SelfHosted configuration. Turn them on in Settings as above, or in configuration.

For a reproducible container setup, enable and configure them through the standard .NET configuration environment variables:

services:
nostos:
environment:
BackupSettings__IsEnabled: "true"
BackupSettings__IntervalHours: "24"
BackupSettings__MaxBackups: "7"
BackupSettings__IncludeBookFiles: "true"
  • IntervalHours controls the minimum time between scheduled backups.
  • MaxBackups limits retained local backup records/archives.
  • IncludeBookFiles controls whether stored book/media files are included.

Keep the /data volume persistent so backup archives survive container replacement.

The SelfHosted API exposes a local backup trigger:

Terminal window
curl -X POST http://localhost:5099/api/backup/trigger

Backup history is available at:

Terminal window
curl http://localhost:5099/api/backup/history

These endpoints are part of the unauthenticated SelfHosted application surface, which is another reason not to expose the instance directly to an untrusted network.

A stored backup is identified by the id returned in backup history.

Restore it with:

Terminal window
curl -X POST http://localhost:5099/api/backup/restore/<backup-id>

The application enters maintenance mode for the restore path and verifies the selected archive before completing the restore.

Before testing recovery on a library you care about, keep an independent copy of the persistent /data volume or a downloaded portable archive.

Local backups are for recovering a SelfHosted installation.

Portable exports are the supported way to move a library between Nostos installations and deployment modes. See Import & Export.