Update rsync docs: emby-fallback profile removed, Emby watch state now synced by play_state_sync.sh

This commit is contained in:
Gmer4Lfe
2026-07-26 11:10:35 -04:00
parent 19036621dc
commit 0061ddef72
3 changed files with 12 additions and 28 deletions
+8 -19
View File
@@ -341,24 +341,9 @@ PROFILES["emby_CRITICAL_CONTAINER_NAMES"]=("Emby")
PROFILES["emby_EXCLUDE_DIRS"]=(
"transcodes/" "logs/" "crash*" "cache/"
)
# ── emby-fallback ─────────────────────────────────────────────────────────────
# Every 30 minutes, Emby STAYS RUNNING — dirty sync of critical state only
PROFILES["emby-fallback_CRITICAL_CONTAINER_NAMES"]=() # nothing stops
PROFILES["emby-fallback_EXCLUDE_DIRS"]=(
"*.wal" "*.shm" # unsafe mid-write
"transcodes/" "logs/" "crash*" "cache/"
)
PROFILES["emby-fallback_REMOTE_RESTART_CONTAINERS"]=("Emby")
```
### Two Emby Profiles — Why Both Exist
**emby-fallback** (every 30 minutes, Emby stays running):
- Syncs: users.db, library.db, authentication.db, config/
- Skips: \*.wal, \*.shm, transcodes/, logs/, cache/
- Why: WAL files are written while Emby runs — copying them would produce a corrupt database on HOST2
- Result: HOST2 is always within 30 minutes of HOST1 on watch state and user activity
### The `emby` Profile and Watch-State Sync
**emby** (Sunday 2:30am, both Emby instances stopped):
- Syncs: everything except transcodes, logs, cache, crash files
@@ -366,8 +351,12 @@ PROFILES["emby-fallback_REMOTE_RESTART_CONTAINERS"]=("Emby")
- Why: WAL is checkpointed on clean shutdown — safe to copy everything
- Result: HOST2 gets a gold-standard Emby state once per week
The two profiles work together. emby-fallback keeps HOST2 current for immediate fallback.
emby gives HOST2 full fidelity once per week. Neither alone is sufficient.
Between weekly mirrors, Emby **watch/resume state** is kept current by
`Media/play_state_sync.sh`, which reads and writes play state over the Emby API every
30 minutes (CRITICAL_MAINTENANCE_SCRIPTS) — so HOST2 never falls more than one cycle
behind on what's been watched. This replaced the old `emby-fallback` dirty-rsync profile:
copying Emby's live SQLite databases mid-write risked landing a half-written WAL file on
HOST2, and an API-level sync sidesteps the database-consistency problem entirely.
---
@@ -705,5 +694,5 @@ name doesn't match any profile key, or when testing a specific profile.
```bash
rsync.sh /mnt/user/appdata-Fallback/Critical-Data --profile=critical-data
rsync.sh /mnt/user/Media_Server/Emby --profile=emby-fallback
rsync.sh /mnt/user/Media_Server/Emby --profile=emby
```