What is a profile? — A named set of rsync options applied to a specific appdata directory. Appdata shares match a profile by their directory basename (lowercased).
PROFILE_RSYNC_OPTS — Full rsync flag string for this profile. Does NOT inherit DEFAULT_RSYNC_OPTS — list every desired flag explicitly. Use $BW_LIMIT to reference the profile's bandwidth limit.
PROFILE_BW_LIMIT — Bandwidth cap in KB/s. Overrides the global BW_LIMIT for this profile.
PROFILE_RETRY_COUNT / SLEEP — How many times to retry on failure, and how long to wait between attempts.
PROFILE_CRITICAL_CONTAINER_NAMES — Containers stopped on BOTH hosts before rsync. Local stops first (flush DBs), then remote. Only running containers get restarted — stopped ones stay stopped.
PROFILE_DELAYED_CONTAINERS — Containers that need a delay after the others start (e.g. NextCloud waits for Postgres).
PROFILE_CONTAINER_DELAY — Seconds to wait before starting delayed containers.
PROFILE_EXCLUDE_DIRS — Space-separated patterns excluded from the rsync. Supports globs (e.g. logs *.tmp *.db-wal).
PROFILE_REMOTE_RESTART_CONTAINERS — Used by dirty-sync profiles. Restarts these containers on the remote after sync so it picks up the new data.
Clean vs dirty sync — Clean: stop containers, --delete, full mirror. Dirty: containers keep running, WAL files excluded, --inplace --no-whole-file for safe partial writes. Use dirty for frequent critical syncs.
App layer — Scripts add their appdata directory to HOST*_CRITICAL_SYNC_SHARES or HOST*_DAILY_SYNC_SHARES using /path/to/dir|profile-name syntax. Creating the profile here makes it available for that reference.