I need to transfer a couple of log-files each hour to a logstorage which all users can reach, and I use rsync for do that, but the problem comes when the log-file is rotated and automatically zipped, rsync detects there is a new file and it transfered it too, that means on the destination server I have:
which is the same logfile but zipped with gzip -9.
this is my rsync line, it is included into a script:
rsync -rvzt --include "*/" --include "$pattern" --exclude "*" $directory firstname.lastname@example.org:/home/user/directory/$subdir/$basefilename
it is executed each hour by a crontab, and it transfer all files matching a $pattern and $directory included in a file which contains paths and patterns I want to transfer.
So my question is if there is an rsync option that I have not seen, or if there is some posibility to do that and how.
Thanks in advance.