Young's Mind
Architecture

Better vault sync — LAB → Production + Google Drive

Better vault sync — LAB → Production + Google Drive

Summary

  • Why GDrive keeps failing: the Obsidian "Google Drive Sync" plugin (RichardX366, id google-drive-sync) spent its backlog (765 queued ops: 704 create / 49 delete / 12 modify) pushing to the developer's third-party token endpoint (ogd-server.richardxiong.com), not Google's own — the empty clientId/Secret in your data.json is not a bug, it is the plugin's default dependency on that external server. helpers/requests.ts shows refreshAccessToken POSTing to accessTokenUrl or the developer server when custom credentials are absent.6Registry confirmed: the community plugin registry lists google-drive-sync, author richardx366, matching what's installed.9 The plugin README itself warns to never share the folder with other sync methods and that conflicts resolve as local-overwrites with no manual merge.5 The plugin's own README warns it must never share a folder with other sync methods and that conflicts resolve as local-overwrites with no manual merge — a bad fit for a vault carrying 1,331 dirty files. Backlog mechanism: the plugin keeps its operations dict accumulating on refresh failures, and its docs direct recovery through Reset local vault to Google Drive after a vault backup.7 It is the cause, not a symptom.[5]6
  • Live topology I probed (ground truth, not cited): LAB vault 197 MB LAB vault 197 MB (99 MB git pack), origin github.com/youngframeworks/solos-vault working under obsidian-git,8 1,331 dirty + 87 untracked; Production vault at ubuntu@161.33.71.67:/home/ubuntu/.solos/docs/vault/ has 2 files / 44 KB and is NOT a git repo; Production already has rclone v1.60.1 + a working gdrive: remote (15 GB free) and verified direct SSH from LAB, plus rclone preinstalled.4 LAB has no rclone/syncthing installed.
  • Recommended architecture: git as transport for Production, rclone as the Google Drive lane, retire the plugin[4][5]8 The Google lane becomes a backup, not a sync — no autoPush plugin involved at all.

Recommendation 1 — LAB → Production via git (the lane that should be primary)

  • The LAB vault already pushes to GitHub (origin/main, last push 2026-10-11 23:08), which is the obsidian-git transport working as documented.8 Production can pull from the same remote: A cron git pull on the prod server (or a bare-repo post-commit fetch hook) makes Production a consumer rather than a peer, which matches the reality on the ground — the prod vault holds almost nothing to merge back.8
  • This is the obsidian-git documented model: clone/push to a remote is the standard transport.8 One remote, one direction of truth: LAB → GitHub → (pull) Production.
  • Cost: zero new infrastructure — wiring only. Production already has git.
  • What the git lane does not cover is automated off-site backup, which is where the rclone lane applies.4

Recommendation 2 — LAB → Google Drive via rclone (scripted, no plugin)

  • rclone's own Google Drive docs describe a drive remote configured with rclone config (OAuth), and warn that rclone's shared client_id is being retired over 2026 — creating your own Google Cloud client ID is the durable setup.4
  • LAB needs rclone installed; Production already has it and an authenticated gdrive: remote. The push runs on whichever host, scripted, e.g.:
    • rclone sync /home/lab/SolOS/vault gdrive:SolOS-vault --backup-dir gdrive:SolOS-vault-archive/$(date +%F) — Snapshot semantics: current state in the main dir, replaced and deleted files preserved under the dated archive dir.4
  • This lane is backup, not collaboration, because nobody works out of GDrive — Google Drive stays a mirror.4: nobody "works out of" GDrive. That removes exactly the failure mode the plugin kept hitting (bidirectional state reconciliation with a 765-op queue).

Why not Syncthing for LAB↔Production

  • Syncthing is peer-to-peer and would work, but its conflict model (older-mtime renamed to *.sync-conflict-<date>-<device> and propagated to all devices) is documented behaviour,1 plus versioning and a .stfolder marker requirement built into folder health.[2]3 and its requirement of a .stfolder marker make it wrong for a vault where Production is a read-only consumer. Two sync methods over one folder is explicitly warned against by the GDrive plugin authors, and stacking a third is worse.5
  • A pull-based git consumer avoids the conflict class entirely, since Production never writes and git has no mtime-based conflict promotion the way Syncthing's versioning does.[1]2

Root cause of the plugin backlog (in the plugin's own source)

  • refreshAccessToken in the plugin (helpers/requests.ts) sends the refresh token to accessTokenUrl, defaulting to https://ogd-server.richardxiong.com/api/access when clientId/Secret are empty. Any failure there is silently logged while the local operations dict keeps accumulating — matching the 704 create / 49 delete / 12 modify backlog observed on your config.
  • The 3.x upgrade notes fix Google Drive paths + resync semantics, confirming deleted-file handling was already buggy in the version you have. The README itself says: "never sync the same folder with other sync methods" — meaning once the backlog corrupts, the recommended forensic recovery is: back up the vault, confirm Google Drive state, then use the plugin's Reset local vault to Google Drive to force resync.
  • Retire it.5 Remove google-drive-sync from .obsidian/community-plugins.json (registry id google-drive-sync, author richardx366).9 (it is kept there alongside obsidian-git and obsidian-kanban), and delete the queued operations so the stale backlog cannot fire on a future auth success.
  1. Commit the 1,331 dirty files on LAB + push to origin (this is the gate for every other lane).
  2. Wire Production git pull cron (or a bare-repo post-commit hook) — verify with a probe commit.
  3. Install rclone on LAB, configure a drive remote using a new client ID,4 and schedule an rclone sync ... --backup-dir job (30-min cadence like the Tam cron, deliver=local failure=origin).
  4. Disable and remove google-drive-sync from community-plugins; leave obsidian-git and obsidian-kanban.
  5. Decide (Young or Sol) whether the LAB laptop's own tam_vault_mirror cron pattern should also push from LAB — the current laptop↔LAB vault lane is fail-closed pending layout reconciliation.

Sources

1 https://docs.syncthing.net/users/syncing.html2 https://docs.syncthing.net/users/versioning.html3 https://docs.syncthing.net/users/faq.html4 https://rclone.org/drive5 https://github.com/RichardX366/Obsidian-Google-Drive6 https://raw.githubusercontent.com/RichardX366/Obsidian-Google-Drive/master/helpers/requests.ts7 https://raw.githubusercontent.com/RichardX366/Obsidian-Google-Drive/master/main.ts8 https://github.com/Vinzent03/obsidian-git/blob/master/docs/Getting%20Started.md9 https://raw.githubusercontent.com/obsidianmd/obsidian-releases/master/community-plugins.json

Copyright © 2026