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.
Back up from Settings
Section titled “Back up from Settings”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
.nostosfiles you copied into the backups folder (/data/backupsin the official container) to the history, so you can restore them.
Scheduled backups
Section titled “Scheduled backups”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"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.