如何使用rdiff-backup按名称排除文件夹

时间:2018-07-05 21:20:13

标签: rdiff-backup exclusionpath

使用node_modules备份文件时,我想排除任何.cache文件夹(或cacherdiff-backup)文件夹。

这是我正在使用的命令:rdiff-backup --include-globbing-filelist $HOME/backuplist.txt --tempdir /dev/shm --terminal-verbosity 5 / /mnt/backups/

还有backuplist.txt

- /var/run
- /var/cache
- /var/spool
- /var/tmp
- /var/lib/docker
- /var/lib/boinc-client
- **node_modules
- **.cache
- **cache
+ /var/
+ /home/
+ /etc/
- /**

例如,rdiff-backup使用这个遍历文件列表来存储/home/myuser/Projects/MyProject/node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/spec/tests.js,而我认为- **node_modules会排除它(例如在the documentation中说),或者会排除/home/myuser/Projects/MyProject/node_modules和每个孩子在一起……

有人可以看到为什么发生这种情况以及如何真正排除此类文件夹吗?

0 个答案:

没有答案
相关问题