You are not logged in.
I want to set up a backup mechanism with btrbk package. Here are my settings:
/etc/fstab
LABEL=magnolia /btrfs rw,noatime,compress=zstd:3,discard=async,ssd,space_cache,commit=120,subvolid=256,subvol=/@ 0 0
LABEL=magnolia /btrbk_pool btrfs noatime,compress=zstd:3,discard=async,ssd,space_cache,commit=120,subvolid=5 0 0
LABEL=magnolia /home btrfs rw,noatime,compress=zstd:3,discard=async,ssd,space_cache,commit=120,subvolid=257,subvol=/@home 0 0
....
-------------------------------------------------------------
/etc/btrbk/btrbk.conf
timestamp_format long
snapshot_preserve_min 18h
snapshot_preserve 48h
snapshot_dir btrbk_snapshots
volume /btrbk_pool
subvolume @home
----------------------------------------
[root@magnolia gabx]# ls -al /btrbk_pool/
total 16
drwxr-xr-x 1 root root 88 May 16 13:30 .
drwxr-xr-x 1 root root 196 May 16 13:52 ..
drwxr-xr-x 1 root root 196 May 16 13:52 @
drwxr-xr-x 1 root root 112 May 16 15:06 btrbk_snapshots
drwxr-xr-x 1 root root 32 May 15 18:53 @home
[root@magnolia gabx]# btrfs sub l /btrbk_pool/
ID 256 gen 1111 top level 5 path @
ID 257 gen 1111 top level 5 path @home
ID 263 gen 1122 top level 257 path @home/gabx.homedir <--- created by systemd.homed
Running dry btrbk leaves me with no error, and running btrbk created the expected snapshot:
[root@magnolia gabx]# ls -al /btrbk_pool/btrbk_snapshots/
total 16
drwxr-xr-x 1 root root 112 May 16 15:06 .
drwxr-xr-x 1 root root 88 May 16 13:30 ..
drwxr-xr-x 1 root root 32 May 15 18:53 @home.20220516T1336
[root@magnolia gabx]# ls -al /btrbk_pool/btrbk_snapshots/@home.20220516T1336
total 0
drwxr-xr-x 1 root root 32 May 15 18:53 .
drwxr-xr-x 1 root root 112 May 16 15:06 ..
drwx------ 1 root root 0 May 15 18:53 gabx
drwxr-xr-x 1 root root 0 May 16 15:08 gabx.homedir
Unfortunately, both gabx and gabx.homedir are empty.
What am I missing?
Thank you for help
NOTE
Even without running btrbk a simple snapshot command leaves me with empty folders:
[root@magnolia gabx]# btrfs sub snapshot /home /btrbk_pool/
Create a snapshot of '/home' in '/btrbk_pool//home'
[root@magnolia gabx]# ls -al /btrbk_pool/home/
total 0
drwxr-xr-x 1 root root 32 May 15 18:53 .
drwxr-xr-x 1 root root 38 May 17 16:29 ..
drwx------ 1 root root 0 May 15 18:53 gabx <--- empty
drwxr-xr-x 1 root root 0 May 17 16:29 gabx.homedir <--- empty
Last edited by gabx (2022-05-17 15:03:39)
Offline
Are gabx and gabx.homedir mountponts or btrfs subvolumes ?
A snapshot with btrfs does contain only the real existing data, no subvolumes are included, a btrfs snapshot is not recursive.
Is this your case ?
Offline