Backup and restore
Mediarr makes encrypted backups of your database and originals with restic. Set them up under Admin → Settings.
Without it, a backup cannot be opened by anyone. If you lose the server, you need this password and the destination to get your library back.
Destinations
- A folder or disk. Add
BACKUP_PATH=/path/to/backupsto.envand rundocker compose up -d. The user set byPUIDmust be allowed to write there. - S3 or S3-compatible storage.
- Backblaze B2.
Old backups are thinned out by themselves. Test bringing it back really restores the newest backup into a temporary place and checks it, so it needs free disk space about the size of your library.
Restoring onto a new server
-
Install Mediarr as usual with Docker Compose, but do not create an account.
-
Stop the server and worker, leaving the database running:
docker compose stop server worker -
Bring the backup back. For a folder, use
/backupas the repository after settingBACKUP_PATHin.env:docker compose run --rm --no-deps -e RESTIC_REPOSITORY=/backup -e RESTIC_PASSWORD=your-backup-password server restore-backupFor S3, use
s3:https://your-endpoint/your-bucketas the repository and also passAWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY. -
Start everything again:
docker compose up -d
Thumbnails are not part of a backup, and are made again by themselves.