pmbs run as root to create readonly btrfs snapshot, so normal user (no
root) can not delete snapshot. So can prevent delete files by mistake (can
recovery from snapshot).
Keep rules should be written in order: time of one rule should be shorter
than the next rule, for example: 1m (minute), 5m, 1h (hour), 1d (day).
Number to keep (n) should be larger than 0.
胖喵必快
https://github.com/fm-elpac/pmbs
(每分钟) 创建 btrfs 快照, 并自动清理.
Make btrfs snapshot (every minute), and auto clean.
正式名称: 紫腹巨蚊 (Toxorhynchites gravelyi) 系列 澳大利亚海神草 (Posidonia australis) 软件
免责声明: 这是开源软件, 没有任何担保, 用户应该承担使用本软件造成的一切后果. 如果不能接受, 请勿使用本软件 !
镜像 (mirror):
胖喵必快使用
root权限创建 只读 btrfs 快照, 所以普通用户 (无 root) 无权限删除快照. 因此可以防止误删文件 (可以从快照找回).pmbs run as
rootto create readonly btrfs snapshot, so normal user (no root) can not delete snapshot. So can prevent delete files by mistake (can recovery from snapshot).安装 (install)
ArchLinux (AUR): https://aur.archlinux.org/packages/pmbs
或者从 release 下载安装包:
Or download pre-compiled package from release:
Fedora CoreOS (RPM):
从 release 下载安装包:
Download pre-compiled package from release:
然后重启系统.
And reboot.
安装之后 (after install):
(1) 编写配置文件, 比如:
Edit config file, for example:
原则上, 保留规则应该按顺序编写, 上一条规则的间隔时间 (
time) 应该比下一条更短, 比如1m(分钟),5m,1h(小时),1d(天). 同时保留个数 (n) 应该大于 0.Keep rules should be written in order:
timeof one rule should be shorter than the next rule, for example:1m(minute),5m,1h(hour),1d(day). Number to keep (n) should be larger than 0.注意: 请关闭 btrfs
quota!! 当 quota 和大量 snapshot 同时使用, 系统会非常慢 (经常卡死). 检查 quota 是否启用, 比如:Please disable btrfs
quota!! When quota is used with a lot snapshots, the system will be very slow. Check if quota is enabled, for example:如果启用了, 禁用 quota, 比如:
If quota is enabled, disable it, for example:
参考资料 (reference):
(2) 启用 systemd 服务 (定期快照/清理):
Enable systemd timer (snapshot/clean):
列出指定 subvol 的快照, 比如:
List snapshots of a subvol, for example:
可以直接使用
btrfs命令删除快照:You can delete a snapshot with
btrfscommand:https://wiki.archlinux.org/title/Btrfs#Deleting_a_subvolume
常见问题 (FAQ)
TODO
例行更新维护策略 (Release new version policy)
适用于本仓库 (pmbs). 当下列条件任意一条满足时, 本仓库的软件需要发布新的维护版本 (版本号
x.y.z其中z+ 1). “更新所有依赖” 并重新编译 (构建):When any of the following is true, this repo should release a new version (version number
x.y.z,z+ 1). Update all dependencies, and rebuild:rustc 发布新版本 (版本号
x.y.z其中x或y变化)rustc release a new version (version number
x.y.z,xorychange)各依赖或本仓库发布重要的安全更新 (修复比较严重的安全漏洞)
The dependencies or this repo release an important security update.
当前重要依赖的版本号:
Current version number of important dependencies:
rustc 1.89.0 (29483883e 2025-08-04)
https://github.com/rust-lang/rust
文档 (doc)
TODO
LICENSE
MIT