FilePrefixError on all --exclude
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
New
|
Undecided
|
Unassigned |
Bug Description
I'm getting this error for the --exclude option, no matter what I specify to exclude and even if I --exclude-filelist. Here's an example of my trace. I'm using duplicity 0.7.17, Ubuntu 18.04.3 LTS, Python 2.7.15+.
> duplicity --exclude .git ~/source_folder file:///target
Traceback (innermost last):
File "/usr/bin/
with_
File "/usr/bin/
fn()
File "/usr/bin/
action = commandline.
File "/usr/lib/
set_selection()
File "/usr/lib/
sel.
File "/usr/lib/
self.
File "/usr/lib/
sel_func = self.glob_
File "/usr/lib/
raise FilePrefixError
FilePrefixError: .git
> duplicity -v9
Command line error: Expected 2 args, got 0
Enter 'duplicity --help' for help screen.
Using temporary directory /tmp/duplicity-
This error means that the source you're backing up (`~/source_folder` is not a prefix of your exclude `.git`). Really that means that excludes should always match the full path, not just a single component. If you want to exclude all files/directories called .git, you could instead specify `--exclude **/.git` to specify all filenames where the last part is `.git`.