implement Exclude in a correct way

Registered by Philippe Delodder

I think that there are several things that should be implemented:

1.) A group of validate methods in utils that ensure that the exclusion criteria is properly formed, and if it is a file or folder, that it properly exists within the path. (This will cause the backup to fail if it does not.)

------ yes, even @runtime(backup) we should check if the folder or file exist within it, and take appropriate actions according to the outcome.

2.) We should use the proper exclude tag based on the type of exclusion. ("--exclude-regexp for shell patterns", etc.)

I like the plan of handling excludeitems within the appropriate settings class. Might this be a good place to add validator methods?

------ I fully agree on that but you can put them where ever you want. If you place them in the appropriate class, you have to create a class before using them, other was you place it in the file outside the class. but that's later on what is the easiest.

- First things first, please push your latest work to the branch. I'll add in the mean time an additional property to the ExcludeItem class, For the config.py I add the constants.
- Next there should be determined what time we first should allow and how we can test them. for example file/folder are easy, but how to check a valid regexp?
- then modify the ui, to allow the possiblities and do the checks where needed.

Blueprint information

Status:
Complete
Approver:
Rob Oakes
Priority:
Essential
Drafter:
Rob Oakes
Direction:
Needs approval
Assignee:
Philippe Delodder
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
milestone icon 0.2
Started by
Philippe Delodder
Completed by
Philippe Delodder

Related branches

Sprints

Whiteboard

% Rob Oakes Comments %

Regarding 1, we might be able to directly leverage the classes from duplicity to verify whether the exclude criterion is correct. Duplicity does this at the time of backup, and it appears to run very quickly (hinting that all checks are performed locally rather than requiring a connection to the remote archive).

% Progress Report %

-- Implemented different type in excludeitem class: successfull
-- Implemented checks if the folder or file exists. : succesfull
-- Implemented check for REGEXP : needs testing

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.