DietPi-Backup filter options only work with a directory depth of 2?

Every (otherwise excluded) parent directory of an included directory needs to be included as well. In this case rsync skips /mnt/backuptest2 and /mnt/backuptest3 all together, so the 2nd and 3rd rule have no effect. Instead try:

+ /mnt/backuptest1/
+ /mnt/backuptest2/
+ /mnt/backuptest2/dir2/
- /mnt/backuptest2/*
+ /mnt/backuptest3/
+ /mnt/backuptest3/dir3/
+ /mnt/backuptest3/dir3/subdir3/
- /mnt/backuptest3/*

So quite nasty to include individual sub directories within an excluded parent dir.

3 Likes