XReplicator – 基于 eBPF 的服务器备份,仅追踪已更改的磁盘扇区

1作者: iamvishnuks015 个月前
我从事云/平台工程已经十年了。有一件事一直让我很沮丧:每个备份工具要么依赖于脆弱的内核模块进行变更块跟踪,要么即使只有 1% 的数据发生变化,也要进行全盘扫描。 所以我们构建了 XReplicator。它使用 eBPF 跟踪点在块设备层跟踪脏扇区——没有内核模块,没有管理程序 API,也没有特定于云的钩子。代理在虚拟机内部运行,适用于任何平台。 内核开发者称我疯了,竟然用 eBPF 来进行磁盘数据复制。但数据说明了一切: * 全备份:约 17 分钟 * 1.4% 变更后的增量备份:约 2 分钟 * 0.4% 变更后的增量备份:约 56 秒 * 扫描的数据量比全备份少 71 倍 * 节省 65–72% 的存储空间(LZ4 + 块级重复数据删除) 无需针对每个内核版本编译内核模块,无需重启,通过 eBPF 验证器进行沙盒执行。可以从链中的任何点恢复到文件、分区或整个磁盘级别。 诚实声明:eBPF 路径仅适用于 Linux 内核 5.10+。对于旧版 Linux 和 Windows,我们退回到基于全盘扫描的增量备份——速度较慢,但可以使用。 XReplicator 源于 XMigrate,我们的开源项目,用于使虚拟机工作负载在云之间可移植。该产品是闭源的,但有一个免费的社区版本。 [https://xmigrate.cloud](https://xmigrate.cloud) [https://github.com/xmigrate/xreplicator/releases](https://github.com/xmigrate/xreplicator/releases) 很乐意深入探讨 eBPF 实现——尽管问。
查看原文
I&#x27;ve been in cloud&#x2F;platform engineering for a decade. One thing that always frustrated me: every backup tool either relies on fragile kernel modules for change block tracking, or does full-disk scans even when 1% of data changed. So we built XReplicator. It uses eBPF tracepoints to track dirty sectors at the block device layer — no kernel modules, no hypervisor APIs, no cloud-specific hooks. The agent runs inside the VM and works on any platform. Kernel devs called me mad for using eBPF for disk data replication. But the numbers speak for themselves:<p>Full backup: ~17 minutes Incremental after 1.4% change: ~2 minutes Incremental after 0.4% change: ~56 seconds 71x less data scanned vs full backup 65–72% storage savings (LZ4 + block-level dedup)<p>No kernel module compilation per kernel version, no reboots, sandboxed execution via the eBPF verifier. Restore at file, partition, or full disk level from any point in the chain. Honest caveat: the eBPF path only works on Linux kernel 5.10+. For legacy Linux and Windows we fall back to full-disk scan based incrementals — slower, but it works. XReplicator grew out of XMigrate, our open source project for making VM workloads portable across clouds. The product is closed source but there&#x27;s a free community version. https:&#x2F;&#x2F;xmigrate.cloud https:&#x2F;&#x2F;github.com&#x2F;xmigrate&#x2F;xreplicator&#x2F;releases Happy to go deep on the eBPF implementation - ask away.