Rsync
Copy content preserving attributes of /foo to /bar:
rsync -aXHA --info=progress2 --stats /foo/ /bar
To exclude specific paths from /foo, for example: --exclude=/.snapshots --exclude=/.swap
To use .rsync-filter files as exclude info use -F flag. For example:
- /.snapshots/
- /.swap/