文章摘要
Syncthing发布了2.0.0版本,主要变化包括数据库从LevelDB切换到SQLite,首次启动时可能需要进行较长的数据迁移;日志格式改为结构化,新增了WARNING级别,并支持按包控制日志级别;删除的项目不再永久保留,默认在六个月后清除,用户可通过命令行选项调整保留时间。
文章总结
Syncthing 2.0.0 版本发布
这是 Syncthing 2.0 系列的首个版本,可能存在一些不完善之处,建议用户保持探索精神。
主要更新内容:
数据库后端切换:从 LevelDB 迁移至 SQLite。首次启动时,数据库迁移可能需要较长时间,尤其是对于大型设置。SQLite 数据库更易于理解和维护,且预期会减少错误。
日志格式变更:采用结构化日志条目(消息加多个键值对)。新增了 WARNING 日志级别,位于 INFO 和 ERROR 之间。INFO 级别现在更加详细,记录 Syncthing 的同步操作。新增命令行参数
--log-level用于设置所有包的默认日志级别,STTRACE环境变量和 GUI 也已更新以支持按包设置日志级别。移除了--verbose和--logflags命令行选项。删除项保留时间:删除项不再永久保留,而是会在六个月后被清除。若需延长保留时间,可通过
--db-delete-retention-interval命令行选项或相应环境变量进行设置。命令行选项现代化:不再支持旧式的单破折号长选项(如
-home需改为--home)。部分选项已重命名,部分变为子命令。所有服务选项现在也支持环境变量。详情可参考syncthing --help和syncthing serve --help。移除滚动哈希检测:由于效果不佳,移除了对数据位移的滚动哈希检测,扫描和同步效率因此提升。
默认文件夹创建:首次启动时不再自动创建默认文件夹。
多连接默认启用:v2 设备之间默认使用三个连接:一个用于索引元数据,两个用于数据交换。
平台支持调整:由于 SQLite 跨平台编译的复杂性,以下平台不再提供预编译二进制文件:
- dragonfly/amd64
- illumos/amd64 和 solaris/amd64
- linux/ppc64
- netbsd/*
- openbsd/386 和 openbsd/arm
- windows/arm
冲突解决处理变更:删除操作现在可以成为冲突解决的胜出结果,导致被删除文件被移至冲突副本。
发布渠道:
- APT 仓库:https://apt.syncthing.net/
- Docker 镜像:docker.io/syncthing/syncthing:2.0.0 或 ghcr.io/syncthing/syncthing:2.0.0({docker,ghcr}.io/syncthing/syncthing:2 用于跟踪主版本)
其他更新: - 修复了多个问题,包括数据库处理、日志记录、文件同步等。 - 新增了多个功能,如数据库统计命令、多连接默认启用、Ed25519 密钥支持等。 - 进行了多项优化和清理工作,如移除废弃的实验性功能、优化内存使用等。
新贡献者: - @ardevd - @yparitcher - @danog
完整更新日志:v1.30.0...v2.0.0
评论总结
对Syncthing功能的正面评价
- 用户普遍认为Syncthing是一款优秀的软件,隐私保护良好,功能简洁且稳定。
- 引用:
- "Amazing piece of software, have been using it for about 5-6 years between 4 computers and an Android phone. Never had a single problem with it, it respects your privacy, does only what it advertises, and gets out of your way."
- "I love this software. I am using it to sync files across different computers and different people for years now."
对Syncthing与其他工具的比较
- 有用户提到使用rsync,并询问Syncthing的优势,认为其可能在于拥有更好的GUI。
- 引用:
- "I use rsync for this, what does syncthing do better? Maybe have a nice GUI?"
对Syncthing更新和改进的讨论
- 用户对Syncthing v2的更新表示认可,特别是取消了默认文件夹的创建和优化了扫描与同步的效率。
- 引用:
- "A 'default folder' is no longer created on first startup. Finally some sanity!"
- "Rolling hash detection of shifted data is no longer supported as this effectively never helped. Instead, scanning and syncing is faster and more efficient without it."
对平台支持的担忧
- 有用户对Syncthing停止为某些平台提供预构建二进制文件表示惊讶,特别是对Windows/ARM的支持取消感到不解。
- 引用:
- "I'm surprised they're dropping windows/arm considering that seems to be the direction things are moving in."
- "I don't understand why they chose to use github.com/mattn/go-sqlite3 instead of modernc.org/sqlite."
对第三方工具SyncTrayzor的提及
- 用户提到SyncTrayzor作为Syncthing的Windows GUI工具,虽然曾停止开发,但新版本已重新接棒。
- 引用:
- "Windows GUI for Syncthing named SyncTrayzor is also actively developed."
- "After SyncTtrayzor stopped being developed in 2021, it just worked along the updating SyncThing as backend."