RoamResearch备份方式-Roam2Github

摘要

本文介绍了一种新的备份RoamResearch的方式:Roam2Github,可以实现对RR进行markdown、json和edn的备份。

前情提要

关于用Github来给RoamResearch做备份,我之前有推荐过roam-to-git。但不知道为什么,在2020年年末时,这个代码运行就不是很流畅,每天我都能收到Github给我发来的备份失败通知。我也尝试进行了维护,但还是无济于事,因为我对github也不是很了解,所以就一直没有折腾了。直到前天看到王树义老师的视频,发现原来大家都遇到了的问题,看来是roam-to-git已经更不上时代了,并且现在有一个新的备份代码可以完美解决RoamResearch的备份问题。

Roam2Github

Roam2Github是由everruler12编写的。
Github地址: https://github.com/everruler12/roam2github
使用说明:

  • Github版: https://github.com/everruler12/roam2github/blob/main/documentation/Full%20Guide%20with%20Step-by-Step%20Screenshots.md
  • Notion版: https://www.notion.so/Roam2Github-Backup-Guide-650925859a4a42cf940e3fb74f5189f9

推荐大家看Github版,因为有图文。我是直接看Notion版(因为Notion版最先出现),全部都是英文,还没图文。

简单说一下Roam2Github相比roam-to-git的优点:

  • roam-to-git后期似乎只备份json(至少我的库文件是这样的),但Roam2Github可以备份markdown、json和edn(RoamResearch最新的备份格式)。
  • roam-to-git是基于私有库,Actions的时长有限制。Roam2Github运行是在公有库,保存数据是私有库,在保护隐私的同时,又不受免费账号Actions的时长限制。

最后,再说明一个操作。在设置Actions时,有一步是Delete the code, and replace with the code here https://raw.githubusercontent.com/everruler12/roam2github-actions/main/.github/workflows/main.yml。这是让你将默认的代码都删除了,然后前往https://raw.githubusercontent.com/everruler12/roam2github-actions/main/.github/workflows/main.yml这个网站,将上面的代码复制到栏中,而不是直接复制这个网址。

目前,这个备份方式已经运行了2天了,能实现每小时进行一次备份,没有报错。