Add support for extended shell globbing patterns.

Asked by Juan Pablo Giménez

There're some plans to add "extended shell globbing patterns" support in the near future?... should be fairly simple because in fact its already working... if you gconf-edit the exclude-list and add patterns like "**/parts", the pattern is passed to duplicity and everything works as expected...
Could be a great feature, maybe for advanced users, but in my case add every "parts" folder (I have a lot and doesn't needs it on backups) its a bit annoying...

regards,

Question information

Language:
English Edit question
Status:
Answered
For:
Déjà Dup Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Michael Terry (mterry) said :
#1

This has already been requested in bug 374274. It would be nice to add, I agree. Thanks for the note about the workaround, I've never tried that. :)

Revision history for this message
Yan Arnd (yan.arnd) said :
#2

Due to the fact that Deja-Dup first provides the user's include list and afterwards provides his exclude list, this workaround works only partly. If you have included two folders
/path/pictures1
/path/pictures2
you cannot exclude all TIF pictures by providing a '**.TIF' or '/path/**.TIF' exclude in gconf's exclude list, since because of Duplicity's matching order – the first include/exclude given has higher priority and overrides later include/excludes partly regarding the same item – both pictures folders are completely included, no matter if a later '**.TIF' exclude was provided. (This would only work if Deja-Dup would first provide the exclude list to Duplicity and then the include list).

What works is to provide exclude items which are sub-items of the previously included folders, so excluding
/path/pictures1/**.TIF
/path/pictures2/**.TIF
via gconf-edit works.

My suggestion is to provide a gconf key where a path to a globbing filelist – which can contain includes and excludes as well – can be lodged. This can be done via gconf-edit or a Deja-Dup command line option, e.g. --set-globbing-filelist – and maybe by a file selector for this in Deja-Dup's GUI, too. Then Duplicity could be served that globbing filelist with higher priority.
This way the "experts" can use Deja-Dup with include/exclude rules perfectly tailored to their needs, while the "normal user" has no problems with GUI options he does not understand.

Revision history for this message
Naël (nathanael-naeri) said :
#3

I'm bringing this question back from a distant past because I'm trying to achieve file inclusion/exclusion through extended shell globbing patterns, as is supported by duplicity and as is suggested by Juan.

However, just for the sake of completeness and uptodateness, two qualities that could be useful to some other poor soul trying to achieve the same result as me, let it be recorded here that, as of Déjà Dup 30.0 on Ubuntu 14.04 LTS:

1) Juan: patterns added into Déjà Dup's exclude-list GConf key are no longer passed to duplicity. I don't know when it stopped working, and why, but Michael probably does. I've tried excluding various patterns with ? [] * or ** and, looking at the log produced by 'DEJA_DUP_DEBUG=1 deja-dup --backup > deja-dup.log', it was clear that they weren't passed to duplicity and that the files and directories I was trying to exclude were backed up.

2) Frank: "Deja-Dup first provides the user's include list and afterwards provides his exclude list", that's not how Déjà Dup works, at least now: instead, the deepest include and exclude are provided first, see bug 514928 and output of grepping /usr/bin/duplicity in the log produced by 'DEJA_DUP_DEBUG=1 deja-dup --backup > deja-dup.log'. So the provided includes and excludes are reordered. I don't know if this reordering would be compatible with patterns in includes and excludes by the way, esp. **. Also, I agree with your suggestion.

I will add to the still-alive bug 374274 that Juan's workaround doesn't work any more.

Can you help with this problem?

Provide an answer of your own, or ask Juan Pablo Giménez for more information if necessary.

To post a message you must log in.