目录
目录README.md

胖喵必快

https://github.com/fm-elpac/pmbs

CI

(每分钟) 创建 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).

安装 (install)

  • ArchLinux (AUR): https://aur.archlinux.org/packages/pmbs

    或者从 release 下载安装包:

    Or download pre-compiled package from release:

    sudo pacman -U pmbs-bin-0.1.0a4-1-x86_64.pkg.tar.zst
  • Fedora CoreOS (RPM):

    release 下载安装包:

    Download pre-compiled package from release:

    sudo rpm-ostree install pmbs-0.1.0a4-1.fc42.x86_64.rpm

    然后重启系统.

    And reboot.


安装之后 (after install):

  • (1) 编写配置文件, 比如:

    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

常见问题 (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 其中 xy 变化)

    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:

文档 (doc)

TODO

LICENSE

MIT

关于
125.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号