How to backup office files

I want to backup all office files and the newly created later in one folder and exclude all other types
How to write the exclude file ?
Thank you.

my test data folder tree is below

D:\RESTIC-TEST\DATA
│   智能匹配系统V3.pdf
│
├───1
│       winserv.exe
│
├───2
│   │   winserv.exe
│   │
│   ├───2-1
│   │       阿里oss.txt
│   │
│   ├───2-2
│   │       2021-08-25.log
│   │       2021-08-30.log
│   │       CACHEDIR.TAG
│   │
│   └───2-3
│           异步消息推送配置表.xlsx
│
└───3
        members.json
        WeChat Image_20200722150945.jpg
        漏单日志.zip

my restic backup command is
restic -r repo -p key backup --exclude-caches --iexclude-file exclude.txt --files-from file.txt -n -vvv

my file.txt content is

D:/restic-test/data/*.pdf
D:\restic-test\data\2\2-3\*.xlsx

Is it possible to make include file supports walk recursively? so just this line will include all excel file
D:/restic-test/data/**/*.xls[xm]

Hi @kuyagic and welcome to the restic community! :slight_smile:

Thanks for the detailed report. Just making sure you haven’t missed this, have you seen the documentation around excluding files?
If not give this a read and see if the information there provides enough information to solve your problem.
https://restic.readthedocs.io/en/latest/040_backup.html#excluding-files

:wave: