[Unit] Description=MemPalace backup (hot — zero downtime, SQLite online-backup API) Documentation=file:%h/mempalace-toolkit/docs/backup-and-recovery.md # Better a skipped run than a run that creates an empty palace somewhere and # then dutifully backs it up. ConditionPathExists=%h/.mempalace/palace [Service] Type=oneshot # Hot mode never stops mempalace-serve. Both SQLite files are copied through the # online-backup API (transactionally consistent, WAL-aware); the HNSW index # segments are copied live and may lag a few records. That is acceptable because # SQLite is authoritative — see docs/backup-and-recovery.md §3. ExecStart=%h/.local/bin/mempalace-backup --keep 7 # Backups are not urgent; the palace server and any running mine are. Yielding # CPU and I/O keeps a 4-second backup from lengthening someone's interactive # search. Nice=10 IOSchedulingClass=idle