btrfs sub snap foo bar creates an exact same contents of subvolume
foo as subvolume
bar, except the subvolumes in
foo, which are excluded in
What I want is excluding some regular folders too from the output (
bar), such as
tmp; just like
rsync --exclude ....
There are several ways to make this happen, for example:
- Create a subvolume for the folders to be excluded. (Con: automatically generated folders can not be excluded as they are created regular folders, such as
node_moduleswith this approach)
- Create a temporary subvolume, delete unwanted files/folders (Most promising approach)
Other than above, can we apply a programmatic filter while creating snapshots?