drag and drop reordering of Filters include/exclude patterns is not preserved (original) (raw)
Describe the bug
- Within Settings > Filters tab, drag and drop of include/exclude patterns are not saved to the settings file.
To Reproduce
- In the Settings > Users tab, select "Include All" for all users.
User Home Exclude All Include Hidden Include All user1 /home/user1 ( ) ( ) (x) root /root ( ) ( ) (x) - Because of the change made in step 1 above, the Settings > Filters tab contains two rules that are automatically added.
plus minus Pattern (x) ( ) + /root/** (x) ( ) + /home/user1/** - Click OK to save changes.
- Next, add an exclude pattern to Settings > Filters.
I want to exclude a particularly large virtual machine directory. Click theAdd Foldersbutton, and enter/home/user1/VirtualBox VMs/build1/***. The rule is added to the end of the list of patterns.plus minus Pattern (x) ( ) + /root/** (x) ( ) + /home/user1/** ( ) (x) - /home/user1/VirtualBox VMs/build1/*** - Because of rsync rules precedence, the "exclude" pattern for a folder within the user's home directory must be listed before the the user's home directory "include" pattern.
Drag and drop the exclude pattern so that it is the 2nd pattern in the list.plus minus Pattern (x) ( ) + /root/** ( ) (x) - /home/user1/VirtualBox VMs/build1/*** (x) ( ) + /home/user1/** - Click OK to save changes.
- Go back into Settings > Filters, and notice that the re-ordering of the patterns was not preserved. Despite the changes made in step 5, the pattern still appears as in step 4.
Although the GUI allows the reordering of patterns, the reordering is not preserved. This is confirmed within the/etc/timeshift.jsonfile under theexcludekey.
# cat /etc/timeshift.json | jq .
{
"backup_device_uuid": "abcdef12-3456-44b3-8fc5-3bff5977154a",
"parent_device_uuid": "",
"do_first_run": "false",
"btrfs_mode": "false",
"include_btrfs_home_for_backup": "false",
"include_btrfs_home_for_restore": "false",
"stop_cron_emails": "true",
"btrfs_use_qgroup": "true",
"schedule_monthly": "true",
"schedule_weekly": "true",
"schedule_daily": "true",
"schedule_hourly": "true",
"schedule_boot": "false",
"count_monthly": "3",
"count_weekly": "5",
"count_daily": "7",
"count_hourly": "12",
"count_boot": "5",
"snapshot_size": "0",
"snapshot_count": "609815",
"date_format": "%Y-%m-%d %H:%M:%S",
"exclude": [
"+ /root/**",
"+ /home/user1/**",
"/home/user1/VirtualBox VMs/build1/***"
],
"exclude-apps": []
} Expected behavior
- Expected behavior is to save the ordering of the patterns shown in the GUI.
Work-Around
- I have found a work-around to the issue. After performing the steps above, with the pattern list appearing as in step 4 above (the exclude pattern is the final item in the list), go back into the Settings > Users tab, and select "Exclude All" for
user1, then select "Include All" foruser1. Now go to the Settings > Filters tab, and notice that the+ /home/user1/**pattern is automatically moved to the end of the list. Click OK. The changes will now be saved.
However, it should be noted that performing any kind of re-ordering of patterns will not be saved. This work-around only works because the actions taken in the previous paragraph caused Timeshift to first remove and then append the user's home directory include pattern at the end of the list.
System:
- Linux Distribution: Linux Mint 19.3 Tricia
- Desktop: Cinnamon
- Application Version: 19.08