garethgeorge / backrest

Backrest is a web UI and orchestrator for restic backup.
GNU General Public License v3.0
787 stars 31 forks source link

Excludes order being re-arranged #362

Closed jnpeterson closed 19 hours ago

jnpeterson commented 2 days ago

Note: if you have a question or need support please post in the discussions area.

Describe the bug A clear and concise description of what the bug is.

I'm trying to set up a backup to only backup files with an NFO extension. I add an exclude to exclude all files and then one to include only NFOs, but once I save and go back into it, the order is reversed.

To Reproduce Steps to reproduce the behavior:

1) Create a new plan and add a path to it with NFO files in subfolders 2) Add two excludes: . and !.nfo in that order. 3) Save the plan. 4) Edit the plan again and the order of the excludes has reversed to !.nfo and then . 5) Running the plan catches no files, but doing a "Run Command" and putting the excludes in the right order works correctly.

Expected behavior A clear and concise description of what you expected to happen. Keep the excludes in the order that they're entered, instead of reordering them.

Screenshots If applicable, add screenshots to help explain your problem.

Platform Info

Additional context Add any other context about the problem here.

garethgeorge commented 1 day ago

Interesting special case re: excludes behavior & it's definitely something backrest excludes need to be able to support.

I think the easiest patch for this is to disable sorting excludes and iexcludes in the next release, will continue to sort other fields e.g. paths.

garethgeorge commented 19 hours ago

Fixed in 1.2.1