docs: add backup notes and refresh checklist

This commit is contained in:
2026-04-03 01:43:46 +03:00
parent 62ab2a9417
commit 2bbf52a41b
3 changed files with 80 additions and 8 deletions

View File

@@ -522,7 +522,7 @@ Responsibilities:
- [x] Implement auth middleware
- [x] Implement current user endpoint
- [x] Implement admin bootstrap user creation
- [ ] Add logout endpoint
- [x] Add logout endpoint
## Library Scanning
@@ -550,7 +550,7 @@ Responsibilities:
- [x] Track detail
- [x] Recent albums
- [x] Random albums or songs
- [ ] Favorites listing
- [x] Favorites listing
- [x] Search endpoint
- [ ] Pagination support
- [ ] Sorting support
@@ -639,8 +639,8 @@ Responsibilities:
- [x] Artist detail page
- [x] Album detail page
- [x] Playlist page
- [ ] Search results page
- [ ] Favorites page
- [x] Search results page
- [x] Favorites page
- [ ] Recently played page
## Frontend Player
@@ -649,10 +649,10 @@ Responsibilities:
- [x] Queue model
- [x] Play/pause
- [x] Next/previous
- [ ] Seek bar
- [x] Seek bar
- [x] Volume control
- [ ] Repeat modes
- [ ] Shuffle
- [x] Repeat modes
- [x] Shuffle
- [x] Track switching
- [x] Keyboard shortcuts
- [x] Mini player
@@ -683,7 +683,7 @@ Responsibilities:
- [x] Single app port for web UI and Subsonic clients
- [x] Reverse proxy example
- [x] HTTP/reverse proxy deployment notes
- [ ] Backup/restore notes
- [x] Backup/restore notes
## Nice-to-Have After MVP

52
deploy/BACKUP_RESTORE.md Normal file
View File

@@ -0,0 +1,52 @@
# Backup And Restore
The minimum persistent state for this project is:
- `data/app.db`
- `data/artwork/`
- your music library mount, if the server machine is the primary storage location
## What To Back Up
Recommended:
- entire `data/` directory
- entire `media/` directory if the same host stores the original files
- your `.env` or deployment environment settings
Why:
- `app.db` stores users, sessions, playlists, favorites, and scanned metadata
- `artwork/` stores extracted embedded covers
- `media/` contains the source files used to rebuild the library index
## Simple Backup Example
PowerShell:
```powershell
$stamp = Get-Date -Format 'yyyyMMdd-HHmmss'
New-Item -ItemType Directory -Force -Path ".\\backups\\$stamp" | Out-Null
Copy-Item -Recurse -Force .\\data ".\\backups\\$stamp\\data"
Copy-Item -Recurse -Force .\\media ".\\backups\\$stamp\\media"
```
## Restore Example
1. Stop the server.
2. Restore `data/` from backup.
3. Restore `media/` if needed.
4. Start the server again.
PowerShell:
```powershell
Copy-Item -Recurse -Force ".\\backups\\20260403-010000\\data\\*" ".\\data"
Copy-Item -Recurse -Force ".\\backups\\20260403-010000\\media\\*" ".\\media"
```
## Notes
- If `media/` is already backed up elsewhere, restoring `data/app.db` and `data/artwork/` is usually enough.
- If `artwork/` is lost but `media/` is intact, the server can rebuild extracted covers during future scans.
- If `app.db` is lost, the library can be rescanned from `media/`, but playlists, favorites, sessions, and users will be lost unless restored from backup.

View File

@@ -75,3 +75,23 @@ server {
- In production the frontend uses relative URLs, so it works correctly behind the same origin without hardcoded API hosts.
- In local frontend development, Vite proxies `/api`, `/rest`, and `/health` to `http://127.0.0.1:5050`.
- If you later enable HTTPS on an external reverse proxy, clients should still connect to one public base URL only.
- Web UI and Subsonic clients should always use the same public base URL, only differing by path usage.
## Recommended Public Contract
Public examples:
- browser: `https://music.example.com/`
- Subsonic clients: `https://music.example.com`
Internal upstream:
- `http://127.0.0.1:5050`
Do not publish separate public ports for:
- web UI
- `/api/*`
- `/rest/*`
- `/api/stream/*`
- `/api/cover-art/*`