Timeshift: Added filters appear to not be working

Created on 26 Feb 2018  ·  16Comments  ·  Source: teejee2008/timeshift

Recently installed Timeshift v18.2 on Ubuntu 16.04 (kernel 4.4 something) I wanted to include two things that were excluded by default. Added the two location using Settings>Filter>Add. Below is the tail end of my exclude.list.

/root/.mozilla/firefox/*.default/Cache
/root/.mozilla/firefox/*.default/OfflineCache
/root/.opera/cache
/root/.kde/share/apps/kio_http/cache
/root/.kde/share/cache/http
/home/*/.mozilla/firefox/*.default/Cache
/home/*/.mozilla/firefox/*.default/OfflineCache
/home/*/.opera/cache
/home/*/.kde/share/apps/kio_http/cache
/home/*/.kde/share/cache/http
+ /media/SSD/plexmediaserver/***
+ /home/matt/Documents/Tips/***
/home/matt/**
/root/**
/home/*/**

Neither of the add locations are being included in the snapshot when I run a manual create for the first snapshot (I have not tried a scheduled backup). I have deleted and re-created several times.

Note that I also have Timeshift v17.11 running on a separate Mint 18.3, and added locations work just fine there.

Unfortunately I can't run 17.11 on the Ubuntu machine because the only disk with enough room is a 4T with no partitions, and 17.11 won't let me select a disk like that (even with the proper format) on the Mint 18.3 system. Timeshift 18.2 fixed that as I was able to select a 4T with no partitions for the snapshot location on the Ubuntu system.

Thanks

Edit: One, possibly unimportant difference is that in 17.11 I used the "Add Folder" button, while for no particular reason, I used the "Add" button in 18.2.

Most helpful comment

@teejee2008 it's not about a sophisticated filter configuration. I use the default settings Exclude All. As soon as I want to include another folder e.g ~/.ssh the filter is reverted from + to - on saving or snapshot creation. This is a bug, no user fault. When I click on the +, - checkbox the filter is reverted after clicking on OK.

All 16 comments

same here. Running timeshift 18.2 with command line interface on headless Debian 9.
/etc/timeshift.json

"+ /root/", works but any entry under /var/spool/ doesn't. For example
"+ /var/spool/cron/
" or "+ /var/spool/cron/crontabs/**"

timeshift

+1. I wanted to INCLUDE home folder hidden (configuration) files but I also have Steam games in $HOME/.steam and emails in $HOME/.thunderbird which I backup separately. Having hidden files included ($HOME/.*), the option to exclude lower level folders ($HOME/.steam/*) doesnt't work.

Please go through the filter rules in rsync's manual pages. The first matching rule is applied for each file, and remaining rules are ignored by rsync. Look at the full list of patterns and determine which pattern gets applied first. Every rule that comes after the first matching rule will be ignored by rsync.

Also, please post the complete exclude.list file from snapshot folder. Simply saying I excluded X, Y, Z is meaningless without the complete list. Any filters that are present before or after the rule may have excluded/included the file.

@mDfRg An include filter for all hidden files will match and include all hidden files in home. Any filter you add to exclude subdirectories after that will be ignored by rsync. Please read up on how rsync filter rules work.

The full list of rules is available in file exclude.list in snapshot folder after snapshot is created. It is also visible using the Summary button on the Filters page in Settings.

Hi, sorry for my English.
I need to include the folder and subfolders /var/spool, but there is no way.
This is the list of exclusions by default and those that I have added. I guess the problem is that by default it filters it.
I have searched the generic list to modify it but I have not found it, there is only the file exclude.list, of the backup copies.
Greetings.

/dev/*
/proc/*
/sys/*
/media/*
/mnt/*
/tmp/*
/run/*
/var/run/*
/var/lock/*
/var/spool/*
/var/lib/docker/*
/lost+found
/timeshift/*
/timeshift-btrfs/*
/data/*
/cdrom/*
/etc/timeshift.json
/var/log/timeshift/*
/var/log/timeshift-btrfs/*
/root/.thumbnails
/root/.cache
/root/.dbus
/root/.gvfs
/root/.local/share/[Tt]rash
/home//.thumbnails
/home/
/.cache
/home//.dbus
/home/
/.gvfs
/home//.local/share/[Tt]rash
/root/.mozilla/firefox/
.default/Cache
/root/.mozilla/firefox/.default/OfflineCache
/root/.opera/cache
/root/.kde/share/apps/kio_http/cache
/root/.kde/share/cache/http
/home/
/.mozilla/firefox/.default/Cache
/home/
/.mozilla/firefox/.default/OfflineCache
/home/
/.opera/cache
/home//.kde/share/apps/kio_http/cache
/home/
/.kde/share/cache/http

  • /home/pepe/.**
  • /home/pepe/**
  • /root/.**
  • /root/**
  • /home/seti/.**
  • /home/seti/**
  • /var/spool/*
    /Datos/*
    /boot1/

    /root/
    *
    /home//*

I have also tried with:

  • /var/spool/**
  • /var/spool/*

pantalla24

Please go through the filter rules in rsync's manual pages. The first matching rule is applied for each file, and remaining rules are ignored by rsync. Look at the full list of patterns and determine which pattern gets applied first. Every rule that comes after the first matching rule will be ignored by rsync.

Also, please post the complete exclude.list file from snapshot folder. Simply saying I excluded X, Y, Z is meaningless without the complete list. Any filters that are present before or after the rule may have excluded/included the file.

@mDfRg An include filter for all hidden files will match and include all hidden files in home. Any filter you add to exclude subdirectories after that will be ignored by rsync. Please read up on how rsync filter rules work.

No offense but why do we have to look for rsync manual?
A program should simplify the work (not just your program).
the way you put it is simply tell us to use rsync and dump timeshift.
i personally don't care about rsync.
if the program has the option than the program should fix the filters based on our choices. not us going berserk over google to find out rsync rules. cause by doing that i can just run the rsync from terminal and there is no use of your program ever again

@logan001 If you are adding your own filters you need to understand how they work in order to be able to use them.

I pointed you to the rsync manual because Timeshift uses rsync underneath and the filter rules are explained there in good detail.

Every user has their own expectation of how the filters work. The program cannot read the user's mind and make changes accordingly. Either try to understand how the filters work by going through the rsync manual, or don't use the filter option.

The default filters are designed to work for most users without causing problems. Any filters you add on your own is your own responsibility. The program cannot predict what you want the final result to be, and it will not make any assumptions regarding that.

Use any application that you find simple enough for your use. I can't make this application any simpler than it already is. If you use rsync from the command line you will still need to understand how the filters work.

@teejee2008 it's not about a sophisticated filter configuration. I use the default settings Exclude All. As soon as I want to include another folder e.g ~/.ssh the filter is reverted from + to - on saving or snapshot creation. This is a bug, no user fault. When I click on the +, - checkbox the filter is reverted after clicking on OK.

I'm experiencing the same bug @StarpTech described.

yup, same here, added a folder i want included and clicked the plus checkbox, clicked ok. When opening filters again it is back to the minus being selected.

yep, sorry but this is a bug. SO frustrating. Every time I think I have found a backup system I can use, this always seems to happen

Same here, arch linux, newest version from AUR.
But found (accidentally) a workaround. By toggling between include all, include only hidden and exclude all it its possible to set up it in a way to behave how it should.

For me the idea was to exclude all I want to exclude from the home folder, then toggle above options until "include all" appeared at the very end of the filters list and was not "automatically" transferred to the top of the list on settings close (happened multiple times, but suddenly it worked).

Also same.

Kernel: 5.6.7-1-MANJARO x86_64
timeshift 20.03.r0.gcecd294-1

Got it working as intended like @konradmalik said.
By fiddling with the include all, include on and exclude all, the exclusions I set up worked.

Absolutely a bug, IMO. You have made a pretty frontend for rsync and added a timer, don't go through all that effort and make a confusing experience for your target audience. If I wanted to read the rsync man pages, I'd just make a cron job. If I say add all in /home/\

I made this app a few years ago when I had the time. The number of users have increased over the years. I no longer have enough free time to deal with the issues being reported and to respond to thousands of users who are using the app.

This is an open-source project that anyone can contribute to. If somebody has the required time and expertise please go ahead and fix the issue, and submit a PR for merging the changes.

@vhborges @StarpTech it work for 19.08 and 20.03 version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

giswqs picture giswqs  ·  5Comments

dm2912 picture dm2912  ·  8Comments

cann357 picture cann357  ·  12Comments

doogie544 picture doogie544  ·  11Comments

tahaun picture tahaun  ·  9Comments