|
2 days ago | |
---|---|---|
.github | 2 days ago | |
build-aur | 2 days ago | |
build-rpm | 2 days ago | |
doc | 5 days ago | |
etc | 2 days ago | |
src | 2 days ago | |
systemd-unit | 5 days ago | |
.gitignore | 5 days ago | |
Cargo.lock | 2 days ago | |
Cargo.toml | 2 days ago | |
LICENSE | 5 days ago | |
README.md | 2 days ago | |
build.rs | 5 days ago |
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 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).
或者从 release 下载安装包:
Or download pre-compiled package from release:
sudo pacman -U pmbs-bin-0.1.0a3-1-x86_64.pkg.tar.zst
从 release 下载安装包:
Download pre-compiled package from release:
sudo rpm-ostree install pmbs-0.1.0a3-1.fc42.x86_64.rpm
然后重启系统.
And reboot.
安装之后 (after install):
Edit config file, for example:
cd /etc/pmbs
sudo cp home.toml.zh.example home.toml # or home.toml.en.example
env EDITOR=nano sudo -e home.toml
原则上, 保留规则应该按顺序编写, 上一条规则的间隔时间 (time
)
应该比下一条更短, 比如 1m
(分钟), 5m
, 1h
(小时), 1d
(天). 同时保留个数
(n
) 应该大于 0.
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.
注意: 请关闭 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:
> sudo btrfs qgroup show /home
ERROR: can't list qgroups: quotas not enabled
如果启用了, 禁用 quota, 比如:
If quota is enabled, disable it, for example:
sudo btrfs quota disable /home
参考资料 (reference):
(2) 启用 systemd 服务 (定期快照/清理):
Enable systemd timer (snapshot/clean):
sudo systemctl enable --now pmbs-snapshot.timer
sudo systemctl enable --now pmbs-clean.timer
List snapshots of a subvol, for example:
pmbs ls /home
btrfs
命令删除快照:You can delete a snapshot with btrfs
command:
https://wiki.archlinux.org/title/Btrfs#Deleting_a_subvolume
TODO
适用于本仓库 (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:
x.y.z
其中 x
或 y
变化)rustc release a new version (version number x.y.z
, x
or y
change)
The dependencies or this repo release an important security update.
当前重要依赖的版本号:
Current version number of important dependencies:
https://github.com/rust-lang/rust
TODO
MIT