Re: cannot exclude specific subdirectory with -P
Denis Corbin <[email protected]>
| Newsgroups | gmane.comp.sysutils.backup.dar.support |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 11/02/2019 15:58, YAMAMOTO.Taku wrote: > Hi, > > On 2019/02/11 22:21, Neil Darlow via Dar-support wrote: >> Hi, >> >> The option -P does not need the trailing /* >> >> Using -P Downloads is sufficient. I agree with Neil, if any directory named "Downloads" is excluded, dar won't recurse in it and the ending /* is useless for that reason (this is a glob expressions, type "man 7 glob" for details) providing -P "*/Downloads/*" will never remove "/home/me/Downloads" because it does not match du to the training /. However any subdirectory found inside home/me/Downloads will be excluded like for example: /home/me/Downloads/documents >> >> If you want to be more selective about which Downloads >> directories are excluded then include more information before >> Downloads e.g. >> >> -R / -P home/foo/Downloads -P home/bar/Downloads > > Still have problem in my Debian Linux9. However Cygwin dar(2.6.2) > is working normal(-P). -P "home/*/Downloads/*" > > I suppose linux dar have any bug. Well, the code is the same between Cygwin and Linux and I have no problem here with -P option following your example and using 2.6.2 on Linux. This might well be a bug but so far it does not seems the most probable explanation. Can you thus try the following: for all the following tests, you can add the --empty option to perform a dry-run execution: this will be faster and will save you disk space to store the test archives. 1 - add -vm option as *first* argument of dar and provide to the mailing-list the options list displayed by dar at the beginning (replace password or any other sensible data with ### if necessary). 2 - check that the 'find' commands matches the files you expect to exclude: find / -path "*/Downloads/*" -ls 3 - add the -an option to dar before any filter option (-P, -g, -I, - -X, ...) an see if that does not work better, excluding the expected directories. This would indicate a case sensitivy issue (uppercase instead of lowercase or viceversa) Regards, Denis -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEOzEprx3d76WjfYGPCDGwvQPYsYIFAlxh5J4ACgkQCDGwvQPY sYJl6A/8CSdWATaG8VgsbslZJZmg+t5eRssm5/KBA4OuIwa4iY08K8zadwtDz7V9 HVAO2ojiKj/QLxdA7Rh7aw9jGNs6OLhE1iatHbBQzXk7lhOzoMPPE8/c9c95XJ+j XAX2YnMHTKCJQQMVWpMYU+YJR30P7MGvBXDXwJ7ZyNSbVxeCS+E0EzFve9rBX70j q73N/I35CS2XjPriGcGn3H6b7RWcgDXihNgVudo3lH9z3FYmsYaNuSuOEqeucaAQ Y2BD5+XPykUH802Dd7oBcTwj96mr9hPU65oD1JoCQeGcW4Hk8tVGq37lv63tckB+ Q5dpHzgBTMpABTOedTTOmXYbgm0TZ8DxmqBdXVE2xeQQzcn+FVlZUcAlQtydRAOr ZynLqXB2es1I0bg6DiJ7mzadtKrbaYN5lIeNHHKJHCvYC64snTaRcQ6yQ3HZ6Ro2 7QbzFuia8p4TKL7L0/fcheeVq9V/5kOP5xP4vt6dsl/Y00oyVNn0LU/rhpvZSHYR dD74Bk0yRKn9YU3WEiL4sqlSWDsAMFYtoUhb4mQlXEuj3xB9lS7SpnwXeDvz43Y0 1g+08zR8VVq2MaYOHjsWx0Goe3pycpkXp9SbJL75qknZzkp6RGZCvnQJXsVgFQm4 6boBJc8SelZCCYIv+14FEBvKrUiJVJ9Wuwav2/lvMaH7OI4O4UA= =dztR -----END PGP SIGNATURE-----