I would like to run cron job that run rsync command to copy files from 3-4 days ago, I've already try some rsync command like this:
rsync -arogzv --ignore-existing --files-from=<(find . -type f,d -mtime +2 ) --exclude={'some_files'} /source /destination
but when my cron running, it says No MTA installed, discarding output
. But, if I change the -mtime
to -2
, it's running but they copying file from 3 days ago until the newest files (for examples today)
I also try rsync command like this:
find /source -type f -mtime +2 -exec rsync -arogzv --ignore-existing --exclude={'some_files'} /source /destination \;
The result is same, it's copying file from 3 days ago until the newest files. What should I do? My goal is to copy files from 3 days ago and the older files, not the newest files.