Files
SubMiner/changes/launcher-sync-command.md
T
sudacode be31f96f02 feat(launcher): add sync command to merge stats and history between machines over SSH
subminer sync <host> exchanges VACUUM INTO snapshots over ssh/scp and each
side merges the other's data as an insert-only union keyed on session UUIDs,
video keys, series title keys, and word/kanji identity. Lifetime totals and
daily/monthly rollups are applied incrementally so pre-retention history
survives, remote-only historical rollups are copied, and re-syncing is
idempotent. sync --snapshot/--merge expose the underlying steps for manual
transfers; a pid-file/mpv-socket guard refuses to run while SubMiner may be
writing the database and schema-version mismatches abort the merge.
2026-07-08 23:28:10 -07:00

841 B

type: added area: launcher

  • Added subminer sync <host> to merge immersion stats and watch history between two machines over SSH. Each side snapshots its database (VACUUM INTO), snapshots are exchanged with scp, and each machine merges the other's data as an insert-only union keyed on session UUIDs / video keys / series title keys, so re-syncing is idempotent and nothing is double-counted. Lifetime totals and daily/monthly rollups are updated incrementally (history older than the session retention window is preserved); remote-only historical rollups are copied. subminer sync --snapshot <file> and subminer sync --merge <file> expose the underlying steps for manual transfers. The command refuses to run while the stats daemon or an mpv session is active (--force overrides) and aborts on stats schema version mismatches.