Does include="*" in rsync copy all hidden files in all sub-directories?

All files are included by default, so if you want to include all files, don't pass any --include or --exclude option.

If you do use patterns, rsync doesn't treat dot files specially. If you wanted to skip dot files, you'd have to explicitly use --exclude='.*'.

Note that --include='.*' would only include dot files. This is a shell pattern, where . stands for itself and * means “any sequence of characters”, not a regex where . means “any character” and * means “any number of the preceding character or group”. Without any exclude directive, you still get all files, so an include directive is just pointless, but if you had some exclude directives, --include='.*' would not mean “include all files including dot files”, it would only mean “include dot files” (and on its own it wouldn't recurse into directories whose name don't start with a dot).


Without specifying any inclusion or exclusion patterns, rsync will copy hidden files and directories.

rsync --stats --progress -av user@vm:/mnt/storage8/backups ~/data/backup_of_backups/