btrbk
btrbk copied to clipboard
Btrbk runs backups just fine, but no files are actually backed up.
Hello, as the title says, only (some?) folders are backed up. Here's my configuration file.
Currently I'm using OpenSUSE Tumbleweed, with kernel: 5.14.14-1-default
Are you sure all your folders specified in subvolume
configs are actually btrfs subvolumes? You can list your subvolumes using lsbtr /mnt/btroot
(as of btrbk-0.30.0), or btrfs sub list -a /mnt/btroot
.
Also note that nested btrfs subvolumes will not be included in snapshots/backups.
Here's lsbtr's output. Note that it includes both "/" and "/mnt/btroot" outputs.
I'm not totally sure, but i think that "/" is a subvolume labeled "@", from which "@boot", "@opt", etc... nest under. Those were automatically created by the openSUSE installer.
Oh I messed something, you have a (sadly quite common) mistake in your btrbk.conf:
What you do here is defining a target for subvolume @/usr/local
only (btrbk does not care about leading whitspaces, in your config the target
only affects subvolume @/usr/local
.
btrbk.conf.5:
Multiple 'target' sections are allowed, in any context: a 'target' defined in 'volume' or global context will be used for all underlying 'subvolume' sections (hint: run "btrbk list" or "btrbk config print" to see the resulting configuration).
In the btrbk
volume /mnt/btroot/
snapshot_dir @/.snapshots/btrbk
subvolume @
...
subvolume @/usr/local
target send-receive /mnt/backups/@snapshots/btrbk
should be:
target send-receive /mnt/backups/@snapshots/btrbk
volume /mnt/btroot/
snapshot_dir @/.snapshots/btrbk
subvolume @
...
subvolume @/usr/local
This way the target
is inherited in all contexts (volume / subvolume)
I'm not totally sure, but i think that "/" is a subvolume labeled "@", from which "@boot", "@opt", etc... nest under. Those were automatically created by the openSUSE installer.
Yes @
is a common alias for the root filesystem mounted a /
.
/.snapshots
is probably created by you the packet manager, (or snapper?)
Run lsbtr -l /
, which will print the mount points as well.
Okay so, i fixed the config file and now it seems like it kinda works (binaries and things like /etc do get backed up), however as you said with:
Also note that nested btrfs subvolumes will not be included in snapshots/backups.
directories like @opt, @root, @srv, etc... Do not get backed up (or at least their contents.
Also now i get a bunch of warnings when running btrbk run
or my script at @cron.daily.