StorageandUNIX
asked on
I am trying to rsync
I need to rsync files that are less than 365 days old to my box.
I set up ssh with a private key of the user on the receiving box to connect to the source.
I am on the source. A regular rsync will work, but they want only files that are 365 days and less moved to the receiving box.
This works: rsync -av --recursive user@host:/tmp/ /tmp/ .... but they want only files that are 365 days and less. Can I incorporate a find command in the syntax?
CENTOS 6.7
I set up ssh with a private key of the user on the receiving box to connect to the source.
I am on the source. A regular rsync will work, but they want only files that are 365 days and less moved to the receiving box.
This works: rsync -av --recursive user@host:/tmp/ /tmp/ .... but they want only files that are 365 days and less. Can I incorporate a find command in the syntax?
CENTOS 6.7
ASKER
I think I tried that syntax
PULL while on source from Remote host executing find on the remote host:
rsync -avz -e "ssh --files-from=<(find -mtime -365) id@host:/sourcedirs /destination
IT Errors out
PULL while on source from Remote host executing find on the remote host:
rsync -avz -e "ssh --files-from=<(find -mtime -365) id@host:/sourcedirs /destination
IT Errors out
ASKER
I meant PULL while on destination host from Remote host
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you!
Open in new window
should do the job.