Live Backups
Use the built-in backup system
Section titled “Use the built-in backup system”SelfHosted Nostos has a built-in backup service that creates verified .nostos archives. The official container stores those archives under:
/data/backupsA 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
Section titled “Scheduled backups”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"IntervalHourscontrols the minimum time between scheduled backups.MaxBackupslimits retained local backup records/archives.IncludeBookFilescontrols whether stored book/media files are included.
Keep the /data volume persistent so backup archives survive container replacement.
Trigger a backup now
Section titled “Trigger a backup now”The SelfHosted API exposes a local backup trigger:
curl -X POST http://localhost:5099/api/backup/triggerBackup history is available at:
curl http://localhost:5099/api/backup/historyThese endpoints are part of the unauthenticated SelfHosted application surface, which is another reason not to expose the instance directly to an untrusted network.
Restore
Section titled “Restore”A stored backup is identified by the id returned in backup history.
Restore it with:
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.
Backup versus portable export
Section titled “Backup versus portable export”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.