garethgeorge/backrest

Excludes order being re-arranged

Closed this issue · 2 comments

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

  • Docker version 27.0.2, build 912c1dd, running on Openmediavault v7.3.0-5
  • Backrest Version 1.2.0

Additional context
Add any other context about the problem here.

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.

Fixed in 1.2.1