Feature: Allow multiple filesystems with `--exclude-other-filesystems`
Summary
Passing --exclude-other-filesystems
limits backups to a single filesystem, namely that of the source root. It would be helpful if this would be expanded to configurable list of filesystems instead.
Usecase
My system has:
- /, the root filesystem
- /containers, a separate filesystems with lxc container roots
- /data, a separate filesystem with data
- A lot of bindmounts that bind (subdirectories of) /data under /container subdirectories.
I would like a backup that:
- Includes / and /containers
- Excludes /data and all the bindmounts
I do not want to list the bindmounts as exclude directly, since then I can be almost sure to at some point I forget one and my backup size explodes.
I now use --exclude-other-filesystems
to make sure that these bindmounts are not included. However, that limits to the filesystem of the source root, so I have to make two separate backups for / and /containers.
Proposed solution
Ideally, I would be able to make a single backup that has a source of /, and something like --exclude-other-filesystems=/,/containers
so it excludes filesystems except for the ones listed.
Alternatively, --exclude-other-filesystems
could maybe include the filesystem root of any directory explicitly mention in an include option/file, which might be more convenient, but might cause small compatibility problems. Maybe a new option (e.g. --exclude-not-included-filesystems
, maybe with a better name) could solve that.
I also just realized that the latter already works a little bit like this, depending on the order of include/exclude options on the commandline, I expect that you can actually override --exclude-other-filesystems
for specific files and directories by including them. i.e. you can include /containers
by specifying it to --include
, but then any subdirectories are again excluded by --exclude-other-filesystems
, so that won't help.
Alternative solution
What would also work, is to allow specifying multiple sources for a single backup, then each source root can be used instead. This is probably a lot more invasive to implement, though it might help to simplify backup situations like mine, or situations where you want to e.g. put /containers
and /data
in the same backup, but not /
. In most cases, you could solve this by using a single source of /
and then arranging what (not) to backup with excludes and includes, except that this won't work for --exclude-other-filesystems
(maybe not even with my above proposed solution, since you'd need to exclude the /
filesystem).
I have:
- ([x] when completed)
-
searched https://gitlab.com/duplicity/duplicity/-/issues for similar issues. If you find a similar issue and the issue is still open, add a comment to the existing issue instead of opening a new one. If you find a Closed issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one. -
searched https://bugs.launchpad.net/duplicity for similar issues. If you find a similar issue, open a new issue on here and include a link to the original issue in the body of your new one. -
tested that this issue still occurs on the latest stable snap (install instructions: https://snapcraft.io/duplicity), please include the snap version ( snap info duplicity | grep installed
) output:installed: x.xx.xx (xx)
-
ideally, tested that this issue still occurs on the latest edge snap, if you can test without risking your data. Please include the snap version output: installed: x.xx.xx (xx)