我正在尝试构建一个全面的过滤器/排除文件,以防止备份没有意义的内容,例如临时/缓存数据或易于重新创建的文件。如果您可以分享(部分)rsync 备份的排除列表,我将不胜感激。
这是我到目前为止所拥有的:
## Universal excludes
lost+found
ld.so.cache
# backup text files (e.g. from Emacs)
- *~
- \#*\#
# Commonly distributed Mac OS X cache
- .DS_Store
# Commonly distributed Windows cache
- Thumbs.db
## Root file system
- /dev/
- /etc/modules.conf
- /media/
- /proc/
- /sys/
- /tmp/
- /usr/portage/
- /usr/src/
- /var/tmp/
- /var/log/
# Of the mounted stuff, whitelist only my two data partitions
- /mnt/
+ /mnt/data1
+ /mnt/data2
# Common package managers …
Run Code Online (Sandbox Code Playgroud)