siyuan-note / siyuan

A privacy-first, self-hosted, fully open source personal knowledge management software, written in typescript and golang.
https://b3log.org/siyuan
GNU Affero General Public License v3.0
22.97k stars 1.62k forks source link

Automatic cleanup of the local data repo may accidentally delete snapshots #13203

Closed 88250 closed 3 days ago

88250 commented 3 days ago

13091 的实现有 bug,会导致误删所有未引用的快照。

另外,加入一个改进:当天的所有快照不纳入清理。

tcmtom commented 2 days ago

https://ld246.com/article/1732032433344 这个公告里面还是写着“每天仅保留 2 个快照”

88250 commented 2 days ago

默认是的

---Original--- From: @.> Date: Wed, Nov 20, 2024 08:33 AM To: @.>; Cc: @.>;"State @.>; Subject: Re: [siyuan-note/siyuan] Automatic cleanup of the local data repo mayaccidentally delete snapshots (Issue #13203)

https://ld246.com/article/1732032433344 这个公告里面还是写着“每天仅保留 2 个快照”

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

zxhd863943427 commented 2 days ago

目前是否有开关和默认关闭?

88250 commented 2 days ago

默认开启,没有开关,因为自动清理是设计预期,如果想要达到不清理的目的,可以将配置值设置大一些。

zxhd863943427 commented 2 days ago

那么升级时自动删除了180天以前的快照怎么处理?这时无法配置

88250 commented 2 days ago

升级以后不要点同步,直接进配置里改就行。

---Original--- From: @.> Date: Wed, Nov 20, 2024 14:19 PM To: @.>; Cc: @.>;"State @.>; Subject: Re: [siyuan-note/siyuan] Automatic cleanup of the local data repo mayaccidentally delete snapshots (Issue #13203)

那么升级时自动删除了180天以前的快照怎么处理?这时无法配置

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

TCOTC commented 2 days ago

打开的时候不是会自动同步的吗?

88250 commented 2 days ago

启动同步不影响,只有第一次触发同步才执行

---Original--- From: "Jeffrey @.> Date: Wed, Nov 20, 2024 15:28 PM To: @.>; Cc: @.>;"State @.>; Subject: Re: [siyuan-note/siyuan] Automatic cleanup of the local data repo mayaccidentally delete snapshots (Issue #13203)

打开的时候不是会自动同步的吗?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

zxhd863943427 commented 2 days ago

那自动同步和退出同步呢?

zxhd863943427 commented 2 days ago

另外,无论怎么说,我不认为这种删除用户数据、哪怕可能是冗余数据的功能,是可以默认自动执行的且没有开关的。

而且默认配置选项远低于大部分用户现存的快照期限。

88250 commented 2 days ago

自动同步会触发,退出同步不触发,所以说可以一进入以后就去改设置。

默认配置 180 天已经足够了吧,实际上一部分用户也有定期手动清空数据仓库的使用习惯。

zxhd863943427 commented 2 days ago

那另一部分呢?我就是一个比较注重快照保存的用户。不能无视这部分用户的需求吧。

这个设计搞得对我来说就是一种要是不看具体更新详情,然后过个一天我的数据就丢失了的感觉。

88250 commented 2 days ago

没有无视需求的,数据安全肯定是第一位,但是对于历史数据只能有选择的保存,这也是性能和安全性之间的权衡。

历史数据的保存期限不可能是永久啊,所以尽量长一点(180 天)已经能够应对大部分灾难恢复场景了。