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.

Scheduled backups are disabled by default in SelfHosted 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.