Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【建议】备份的步骤可以精简 #15

Open
TomIsFat opened this issue Apr 11, 2024 · 0 comments
Open

【建议】备份的步骤可以精简 #15

TomIsFat opened this issue Apr 11, 2024 · 0 comments

Comments

@TomIsFat
Copy link

背景:

在使用工具的过程中发现,工具有两大步骤
1 获取所有页面到buffer_file中
2 根据buffer_file中的内容还原为可供阅读的MD文件

第1步是动态更新的,文件若不更新则不会覆盖之前的文件,对存储友好
第2步会完全覆盖之前的所有文件,库中的文件若是多的话,则每次覆盖都会写入大量文件

发现:

第2步其实是多余的,因为一般情况下我们并不需要去观看我们备份好的文件,notion若是访问不出问题我们便不会去看本地备份的文件

建议:

第1步,为备份操作,生成的buffer_file即backup_file
第2步,为还原操作,还原为可供本地观看的格式,一般不会使用
这样做的好处是:备份是动态备份,对存储友好,少了第2步速度也更快

临时解决方案:

目前可以通过将backup_root_path的配置设置为不存在的路径,即可达到相同的效果,不过备份完成后会报一个错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant