Remotely Save Guard

unlisted

by lessismore

Watches Remotely Save, retries failed syncs, and only alerts after repeated failures.

Updated 2d ago
View on GitHub

Remotely Save Guard

仓库:https://github.com/lessismoretest/remotely-save-guard

一个很小的 Obsidian 伴生插件,不复制 Remotely Save 的同步引擎,只负责:

  • 读取 Remotely Save 自己的自动同步设置;
  • 自动同步长时间没有成功时,补触发一次同步;
  • 连续失败时按 30 秒、2 分钟、5 分钟退避重试;
  • 连续失败达到阈值后才通知,成功时不打扰;
  • 同步长时间没有进度时提示可能卡住。

设置

  • 启动后检查延迟:默认 10 秒。
  • 兜底间隔:仅在 Remotely Save 关闭定时自动同步时使用,默认 5 分钟。
  • 连续失败通知阈值:默认 3 次。
  • 卡住判定:默认 15 分钟。

同步频率本身仍由 Remotely Save 的“Schedule For Auto Run”控制。

状态图标

侧边栏使用云图标,云本身保持 Obsidian 的默认颜色,右下角徽标显示状态:

  • 绿色对号:同步正常;
  • 蓝色刷新:同步中;
  • 红色叉:连续失败或可能卡住;
  • 时钟:等待检查或等待重试;
  • 灰色减号:守护已停用。

同步成功不弹通知;连续失败达到阈值后才通知。

同步频率

Guard 不另建同步引擎,默认跟随 Remotely Save 自己的自动同步间隔(你当前是 60 秒)。要改频率,在 Remotely Save 的设置里改 Schedule For Auto Run;不建议低于 60 秒,OneDrive 可能返回 429 限流。

只有 Remotely Save 的定时自动同步关闭时,Guard 才按“兜底间隔”补一次同步。

安装

把 main.js、manifest.json、styles.css 放到 vault 的:

<vault>/.obsidian/plugins/remotely-save-guard/

然后在 Obsidian 的“第三方插件”中启用 Remotely Save Guard。

BRAT 安装(推荐给 iOS / iPadOS)

  1. 在 Obsidian 中安装并启用 BRAT。
  2. BRAT 设置 → Add Beta Plugin → 输入 lessismoretest/remotely-save-guard。
  3. 选择最新版本,安装并启用 Remotely Save Guard。

仓库是公开的,BRAT 不需要 GitHub Token。

iOS / Android

插件使用 Obsidian 公共 API,isDesktopOnly 为 false,可以安装到移动端。把同样的三个文件放到移动端 vault 的:

<vault>/.obsidian/plugins/remotely-save-guard/

iOS 手动安装

  1. 把 remotely-save-guard-0.1.1-ios.zip 通过 AirDrop 或 iCloud Drive 传到 iPhone。
  2. 在“文件”App 里解压,得到一个 remotely-save-guard 文件夹。
  3. 用 Taio(免费)或 Documents by Readdle 打开 On My iPhone → Obsidian → <你的 vault> → .obsidian → plugins。iOS 的“文件”App 默认隐藏 .obsidian,所以需要这类能显示隐藏文件的管理器。
  4. 把整个 remotely-save-guard 文件夹放进 plugins,确认 manifest.json 就在这个文件夹的根目录。
  5. 打开 Obsidian → 设置 → 第三方插件 → 启用 Remotely Save Guard。

如果 iOS vault 在 iCloud Drive 里,也可以直接在 Mac 的 Finder 打开 iCloud Drive/Obsidian/<你的 vault>/.obsidian/plugins,把文件夹拖进去,等 iCloud 同步。

移动端限制

移动端限制来自 Obsidian 本身:Obsidian 在后台被系统挂起或杀掉时,插件不能持续运行。Guard 会在 Obsidian 启动或回到前台后的下一次检查中补做同步。iOS 尤其严格,不能保证 App 关闭时也实时同步。

移动端没有桌面状态栏;侧边栏的云图标和状态徽标仍然存在,点一下可以立即检查并同步。

许可与兼容边界

本插件没有复制 Remotely Save 的 pro/ 代码。Remotely Save 的 src/、tests/、docs/、assets/ 是 Apache-2.0;pro/ 是 PolyForm Strict 1.0.0,只允许非商业用途,不允许修改、衍生或分发。Guard 只在你已经安装的 Remotely Save 上调用其同步入口。个人使用没有问题;商业使用需要自行确认 Remotely Save 的授权。

Guard 读取 Remotely Save 的内部字段(syncRun、lastSuccessSyncMillis、lastFailedSyncMillis 等)。已在 Obsidian 1.15.1 + Remotely Save 0.5.25 上实测;如果以后升级 Remotely Save,需要重新测试。

恢复卡住

如果同步真的卡住,运行命令:

Remotely Save Guard: 重载 Remotely Save 并同步

这会禁用并重新启用 Remotely Save,然后触发一次同步。

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.