Skip to content

云端同步数据仓库 #5142

Closed
Closed
@88250

Description

@88250

背景

目前的数据同步/备份和数据历史存在一些问题:

  • 同步和备份的网络传输性能较差
  • 同步不支持数据合并
  • 数据历史功能较弱
  • 只能存在一个数据备份
  • 端到端加密实现不够安全

为此我们需要一个全新的机制来解决这些问题。

目标

  • 减少网络传输流量
  • 减少数据大小
  • 支持手动快照和恢复
  • 支持同步自动合并无冲突的文件

项目

DejaVu

设计

仓库

参考 ArtiVCrestic 对 data 文件夹建库 repo:

  • store 键值对存储,加密内容作为值,值的 SHA-1 作为键,使用文件系统实现
  • objects 对象集
    • index 文件列表,不考虑文件夹、权限属性和符号链接
    • file 文件
    • chunk 数据块
  • refs 引用集
    • latest 内建指向最新的 index
    • tags 用户手工标记
  • ignore 忽略配置

编码

对比

  • 对比两个 indexes 得到结果 upserts 和 removes

快照

  • Index 索引 data 文件夹
    Checkout 恢复 data 文件夹

同步

  • 对比 indexes,执行块级 pull/push
  • 冲突处理
    • 冲突文件将下载的云端文件归入历史
    • 无冲突的云端合并到本地

日志

  • 列出索引

前置

关联

Activity

self-assigned this
on Jun 9, 2022
added this to the backlog milestone on Jun 9, 2022
moved this to Short Term 近期计划 in SiYuan Roadmapon Jun 9, 2022
moved this from Short Term 近期计划 to 正在进行 In Progress in SiYuan Roadmapon Jun 9, 2022
changed the title [-]新的数据快照和同步机制[/-] [+]新的数据历史和同步机制[/+] on Jun 9, 2022
changed the title [-]新的数据历史和同步机制[/-] [+]新的数据快照和同步机制[/+] on Jun 11, 2022
AugustTuan

AugustTuan commented on Jun 12, 2022

@AugustTuan

懂了

UltramarineSky

UltramarineSky commented on Jun 13, 2022

@UltramarineSky

建议忽略配置在软件内直接配置

changed the title [-]新的数据快照和同步机制[/-] [+]云端同步数据快照[/+] on Jun 13, 2022
ericma15

ericma15 commented on Jun 18, 2022

@ericma15

推荐一下 kopia,个人一直在用,挺好的

25 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @RobinQu@88250@ericma15@AugustTuan@UltramarineSky

      Issue actions

        云端同步数据仓库 · Issue #5142 · siyuan-note/siyuan