我正在使用btrbk
来制作子卷的快照@home
,但快照是空的,零字节。我想我需要以某种方式自动挂载 home。我在 Btrfs Assistant 文件查看器中看到名为“@”的根子卷下列出了“@home”和“home”,而“@home”没有填充。
sudo btrbk run
[sudo] password for shmuel:
--------------------------------------------------------------------------------
Backup Summary (btrbk command line client, version 0.32.6)
Date: Mon Apr 29 20:43:36 2024
Config: /etc/btrbk/btrbk.conf
Legend:
=== up-to-date subvolume (source snapshot)
+++ created subvolume (source snapshot)
--- deleted subvolume
*** received subvolume (non-incremental)
>>> received subvolume (incremental)
--------------------------------------------------------------------------------
/@home
+++ /.snapshots/@home.20240429T2043
但结果是空的。
我的子卷如下所示:
sudo btrfs subvolume list -p /
ID 256 gen 2674 parent 5 top level 5 path @
ID 257 gen 2667 parent 5 top level 5 path @home
ID 258 gen 2667 parent 256 top level 256 path srv
ID 259 gen 68 parent 256 top level 256 path var/lib/portables
ID 260 gen 68 parent 256 top level 256 path var/lib/machines
ID 261 gen 2674 parent 256 top level 256 path tmp
ID 262 gen 2657 parent 256 top level 256 path var/tmp
ID 263 gen 2645 parent 256 top level 256 path .snapshots/@home.20240429T2031
ID 264 gen 2665 parent 256 top level 256 path .snapshots/@home.20240429T2043
系统是NixOS
btrbk 配置文件如下所示:
backend btrfs-progs-sudo
snapshot_preserve_min 7d
stream_compress no
volume /
snapshot_dir .snapshots
subvolume @home
但它说它是只读的。我认为这是因为我在 NixOS 配置文件中定义了它,如下所示:
#BTRFS automatic snapshots of Home
services.btrbk.instances."btrbk" = {
onCalendar = "*:0";
settings = {
snapshot_preserve_min = "7d";
volume."/" = {
subvolume = "@home";
snapshot_dir = ".snapshots";
};
};
};