I need to exclude files older than 90 days without modification from the backup. I generated the file list with the following command:
$ find ‘d:\DATA’ -type f -mtime +91 > ignore.list
$ wc -l < ignore.list
837542
When I run restic, it returns the following message:
$ restic -vvv … backup --exclude-file ignore.list ‘d:\DATA’
Match: syntax error in pattern Match: syntax error in pattern … Match: syntax error in pattern
…
scan finished in 26849.427s: 29649 files, 721.915 GiB
Microsoft Windows Server 2016 Standard
restic 0.12.0 compiled with go1.15.8 on windows/amd64
Yes. Restic could indicate which pattern is failing.
That’s a valid point, it would probably be helpful if the error message printed the line of the file that has the syntax error. Seems like a valid issue to report through the issue tracker, although it might not make it to the top of the priority list.
The exclude patterns seem to use go glob expansions:
So in order to use the output of file listing commands as an include list, it would probably be helpful if there existed a small utility to escape lines of fixed filenames and convert them into glob patterns that match only those filenames. Anyone know of a utility or simple way to achieve this?
Perhaps this is only an issue on Windows and has therefore received less attention?