2

Let's say I want to exclude ever-changing logfiles from backups.

Parent subvolume / Child subvolume /log

I snapshot /. Looking at the snapshot, /.snapshots/today/log will be empty, correct? This is a valid way for structuring backup exclusions?

2

Taking snapshots of a subvolume is not a recursive process. If you create a snapshot of a subvolume, every subvolume or snapshot that the subvolume contains is mapped to an empty directory of the same name inside the snapshot. (from https://docs.oracle.com/cd/E37670_01/E37355/html/ol_use_case3_btrfs.html)

If your layout fits, making snapshots of subvolumes that you want will naturally exclude subvolumes that you don't want snapshots of. Snapshots are not backups, but this does effectively exclude the logfiles from the snapshot. If you take a backup from the snapshot, the logfiles should also get excluded from the backups.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.