Skip to content
This repository has been archived by the owner on Oct 16, 2022. It is now read-only.

drag and drop reordering of Filters include/exclude patterns is not preserved #626

Closed
james-valente-simplisafe opened this issue Jun 26, 2020 · 3 comments

Comments

@james-valente-simplisafe

Describe the bug

  • Within Settings > Filters tab, drag and drop of include/exclude patterns are not saved to the settings file.

To Reproduce

  1. 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)
  2. 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/**
  3. Click OK to save changes.

  4. Next, add an exclude pattern to Settings > Filters.

    I want to exclude a particularly large virtual machine directory. Click the Add Folders button, 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/***
  5. 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/**
  6. Click OK to save changes.

  7. 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.json file under the exclude key.

    # 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" for user1. 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
@james-valente-simplisafe
Copy link
Author

See also issue #495.

@piks
Copy link

piks commented Jul 15, 2020

I'm having this same issue as well, I found using the X to close it instead of pressing ok, sometimes randomizes order, so I continued to do so until it got the right order, thankfully I only had 3 filters so it didn't take too long

@OwenAR
Copy link

OwenAR commented Oct 3, 2021

(
Note to any hypothetical future equivalents of me who are still having this issue:
make sure you're using the newer version from the ppa like it says in the readme (sudo add-apt-repository -y ppa:teejee2008/timeshift)
not an old version from the default repos of your distro.
)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants