This way did not work:
- Code: Select all
- /var/log/*
+ /var/log/clamav/
+ /var/log/clamav/*
This way works, but it's not perfect:
- Code: Select all
# The next two lines exclude everything in /var/log
# except /var/log/clamav/ (or anything else beginning with "c")
- /var/log/[a-b,A-Z]*
- /var/log/[d-z]*
Another option would be to list everything in /var/log separately.
Also note the leading slashes. In the next version of snapshot, all items in snapshot_exclude.list will have the leading slash. Without that, rsync looks for the pattern at all levels as it recurses, and that's what caused the problem with the missing "live" files and directories.