Backup & Restore
Librariarr includes a full backup and restore system that can run on a schedule or be triggered manually.
Backup Types
Section titled “Backup Types”Config-Only (Default)
Section titled “Config-Only (Default)”Backs up your configuration, servers, rules, integrations, and settings. Excludes tables that are repopulated by syncing or lifecycle processing:
- Media items
- External IDs
- Media streams
- Sync jobs
- Rule matches
- Lifecycle actions
- Lifecycle exceptions
- Watch history
- Log entries
Use case: Routine backups. After restoring, run a full sync to repopulate media data.
Full Backup
Section titled “Full Backup”Backs up everything, including all media metadata.
Use case: Migrating to a new instance without wanting to re-sync, or when sync would take a very long time for large libraries.
Enable full backups by checking Include media data when creating a manual backup.
Encryption
Section titled “Encryption”Backups can be encrypted with a passphrase for security.
- Minimum passphrase length: 8 characters
- Uses strong encryption (AES-256-GCM) with brute-force-resistant key derivation
Set the encryption password in Settings → General → Backup & Restore.
What's included
Section titled “What's included”Configuration backups capture every column of the configuration tables, including:
- User accounts — usernames, hashed passwords, Plex IDs/tokens, and SSO linkage (
ssoSubject,ssoProvider,ssoEnabled) - App settings — schedules, notifications, theme, and the full SSO configuration (mode, OIDC issuer/client ID/client secret/scopes/username claim, forward-auth header names, master
ssoEnabledtoggle) - Media servers, libraries, and integrations (Sonarr, Radarr, Lidarr, Seerr)
- Lifecycle rule sets, blackout schedules, preroll presets and schedules, saved queries
After restoring, SSO is restored exactly as configured at backup time. If the restored backup has SSO enabled but you cannot reach the IdP from the new environment, use the SSO_DISABLE_OVERRIDE env var to recover access.
Scheduling
Section titled “Scheduling”Configure automatic backups in Settings → General:
| Schedule | Frequency |
|---|---|
| Manual | No automatic backups |
| Every 6 hours | 4 times per day |
| Every 12 hours | Twice per day |
| Daily (default) | Once per day |
| Weekly | Once per week |
Retention
Section titled “Retention”Set how many backups to keep. Older backups are automatically deleted when the limit is reached. Default: 7 backups.
Scheduled backups are always config-only and use the saved encryption password (if set).
Creating a Manual Backup
Section titled “Creating a Manual Backup”- Go to Settings → General → Backup & Restore
- Optionally check Include media data for a full backup
- Click Create Backup
- The backup is created and appears in the Available Backups list
Restoring a Backup
Section titled “Restoring a Backup”From Settings (While Logged In)
Section titled “From Settings (While Logged In)”- Go to Settings → General → Available Backups
- Find the backup you want to restore
- Click Restore
- If encrypted, enter the passphrase
- Confirm the restore — this replaces all current data
- Monitor progress as each table is restored
- After completion, you are automatically logged out
From Login Page (No Account)
Section titled “From Login Page (No Account)”If no account exists (fresh install or after data loss):
- Navigate to the login page
- Backups from
/config/backups/are automatically listed - Select a backup to restore
- Enter passphrase if encrypted
- After restore, log in with your restored credentials
Restore Process
Section titled “Restore Process”The restore process:
- Clears all existing data from the database
- Restores data table by table (progress is shown in the UI)
- On completion, logs you out and redirects to the login page
Storage
Section titled “Storage”| Path | Description |
|---|---|
/config/backups/ | Default backup directory |
BACKUP_DIR env var | Override the default backup directory |
Backup files follow the naming pattern: librariarr-backup-{timestamp}.json.gz[.enc]
Managing Backups
Section titled “Managing Backups”From the Available Backups section:
- Download — Save a backup file locally
- Restore — Restore this backup (replaces all data)
- Delete — Remove a backup file
Limitations
Section titled “Limitations”- Restoring replaces all data — there is no selective/partial restore
- Encrypted backups require the exact passphrase used at creation time
- The restore process logs out all sessions — plan accordingly
- Full backups can be large for libraries with tens of thousands of items