Using relative paths when selecting files

Registered by Elifarley Cruz on 2011-11-04

Currently, one must use absolute paths when specifying which files to include or exclude.

I think it would be better if we could use relative paths.

Without relative paths, in an include or exclude specification, one should use the source directory as prefix, as in the example below:

Source directory: /var/tmp/testfiles/select/

Command:
duplicity \
--exclude "/var/tmp/testfiles/select/1/1/2" \
--include "/var/tmp/testfiles/select/1/1" \
--include "/var/tmp/testfiles/select/foobar" \
/var/tmp/testfiles/select/ file:///tmp/backup

With an option to use relative paths, one could simplify the selection as shown below:

Source directory: /var/tmp/testfiles/select/

Command:
duplicity --use-relative-paths \
--exclude "1/1/2" \
--include "1/1" \
--include "select/foobar" \
/var/tmp/testfiles/select/ file:///tmp/backup

In addition to that, if the source directory is moved from "/var/tmp/testfiles/select" to "/tmp/20110607/testfiles/select", you can keep exactly the same relative include and exclude arguments.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Kenneth Loafman

Related branches

Sprints

Whiteboard

I'd definitely love to have this feature.
Added this request here
https://gitlab.com/duplicity/duplicity/-/issues/51

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.