orch naming restructure with the scripts

This commit is contained in:
2026-04-21 19:46:04 -04:00
parent 107b9d99fe
commit 2467183a68
4 changed files with 26 additions and 26 deletions
+10 -10
View File
@@ -57,22 +57,22 @@ Every cycle `transcode_management.sh` records stats to `/boot/config/transcode_d
---
### `daily_sync.sh`
### `media_shares_sync.sh`
Syncs each server's source-of-truth media shares to the remote server sequentially. Each server only pushes the shares it owns — direction and share list are automatic based on which server is running the script.
```bash
# Scheduled as: 0 1 * * * (1am daily — on both servers)
/mnt/user/appdata/unraid_scripts/Orchestrators/daily_sync.sh
/mnt/user/appdata/unraid_scripts/Orchestrators/media_shares_sync.sh
```
**Bidirectional — same script, correct direction automatically:**
```
HOST1 runs daily_sync.sh → pushes HOST1_DAILY_SYNC_SHARES → TO HOST2
HOST1 runs media_shares_sync.sh → pushes HOST1_DAILY_SYNC_SHARES → TO HOST2
Movies, Tv_Shows, Music, Books etc. — HOST1 is source of truth
HOST2 runs daily_sync.sh → pushes HOST2_DAILY_SYNC_SHARES → TO HOST1
HOST2 runs media_shares_sync.sh → pushes HOST2_DAILY_SYNC_SHARES → TO HOST1
Anime_Shows, Anime_Movies — HOST2 is source of truth
```
@@ -135,13 +135,13 @@ The same share lists are used by `failover.sh` for Tier 4 writeback — but in t
---
### `nightly_critical_full_sync.sh`
### `critical_shares_full_sync.sh`
Runs a clean nightly sync for Emby and the auth stack (Critical-Data) with containers stopped. This is the companion to the hourly dirty sync — it provides a fully consistent state on HOST2 once per night.
```bash
# Scheduled as: 30 2 * * 0 (2:30am Sunday — weekly clean sync)
/mnt/user/appdata/unraid_scripts/Orchestrators/nightly_critical_full_sync.sh
/mnt/user/appdata/unraid_scripts/Orchestrators/critical_shares_full_sync.sh
```
**Why two Emby syncs:**
@@ -202,7 +202,7 @@ Auth: logs, *.tmp, nginx/temp, nginx/cache, notification.txt
Runs all media maintenance scripts sequentially in the order defined in `Master.conf`. Scheduled once daily, typically after the nightly sync.
```bash
# Scheduled as: 0 2 * * * (2am daily — after daily_sync.sh)
# Scheduled as: 0 2 * * * (2am daily — after media_shares_sync.sh)
/mnt/user/appdata/unraid_scripts/Orchestrators/media_management.sh
```
@@ -301,12 +301,12 @@ This pattern means:
```bash
# Recommended schedule
*/3 * * * * transcode_management.sh # cleanup then manager — every 3 minutes
0 1 * * * daily_sync.sh # 1am — media shares to remote
0 1 * * * media_shares_sync.sh # 1am — media shares to remote
0 2 * * * media_management.sh # 2am — permissions, cleaners, arr cleanup
30 2 * * 0 nightly_critical_full_sync.sh # 2:30am Sunday — clean Emby + auth stack
30 2 * * 0 critical_shares_full_sync.sh # 2:30am Sunday — clean Emby + auth stack
```
`daily_sync.sh` and `media_management.sh` run nightly — media shares and maintenance. `nightly_critical_full_sync.sh` runs weekly on Sunday — it stops Emby and the auth stack for a clean consistent sync. Running it weekly instead of nightly lets Emby's image cache stay warm on HOST2 throughout the week. The emby-failover dirty sync handles watch states, library structure, and auth every 30-60 minutes — the weekly clean sync covers metadata, plugins, and a full database flush.
`media_shares_sync.sh` and `media_management.sh` run nightly — media shares and maintenance. `critical_shares_full_sync.sh` runs weekly on Sunday — it stops Emby and the auth stack for a clean consistent sync. Running it weekly instead of nightly lets Emby's image cache stay warm on HOST2 throughout the week. The emby-failover dirty sync handles watch states, library structure, and auth every 30-60 minutes — the weekly clean sync covers metadata, plugins, and a full database flush.
---
@@ -1,12 +1,12 @@
#!/bin/bash
# -----------------------------------------------------------------------------------------------
# --------------------------------- Nightly Critical Full Sync Orchestrator ----------------------------------
# --------------------------------- Critical Shares Full Sync ----------------------------------
# -----------------------------------------------------------------------------------------------
# Runs clean nightly sync for Emby and the auth stack (Critical-Data).
# Both require containers stopped for a consistent, safe state sync.
#
# Why this exists as a separate orchestrator from daily_sync.sh:
# daily_sync.sh handles media shares — large, runs at 1am, no container stops needed
# Why this exists as a separate orchestrator from media_shares_sync.sh:
# media_shares_sync.sh handles media shares — large, runs at 1am, no container stops needed
# This script handles appdata that needs containers stopped for clean state:
#
# Emby:
@@ -21,7 +21,7 @@
# Users, groups, proxy rules, SSL certs all consistent
# Adding a user on HOST1 → propagates to HOST2 overnight automatically
#
# Schedule: 2:30am daily — after daily_sync.sh (1am) finishes
# Schedule: 2:30am daily — after media_shares_sync.sh (1am) finishes
# Container stop time is brief — Emby ~30s, auth stack ~15s
# Users experience a short Emby interruption at 2:30am — acceptable tradeoff
#
@@ -77,7 +77,7 @@ SHARE_TIMES=()
TOTAL_START=$(date +%s)
SYNC_JOBS=(
"/mnt/user/appdata-Failover/Emby"
"/mnt/user/Media_Server/Emby"
"/mnt/user/appdata-Failover/Critical-Data"
)
@@ -1,6 +1,6 @@
#!/bin/bash
# -----------------------------------------------------------------------------------------------
# --------------------------------- Daily Sync Orchestrator ------------------------------------
# --------------------------------- Media Shares Sync ------------------------------------
# -----------------------------------------------------------------------------------------------
# Runs all media shares sequentially in the correct direction for the local server.
# Each server pushes its own source-of-truth shares to the remote — direction is automatic.