Can rsync be done with a date filter, such that only files newer than some date are transferred? Right now I do rsync using an Applescript and it just backs up all of the files in a remote directory, regardless of date modified. If rsync cannot do date filtering natively, date filtering with Applescript would be开发者_开发技巧 acceptable...
Excerpt of current script:
do shell script ("rsync -av -f \"+ *.fid\" -f \"- /*\" username@" & server & ":/home/" & user & "/ ~/Documents/" & user & "/RawNMRs/")
Thanks!
I have stumbled across an answer based on find and piping arguments from Server Fault. I've also found a better alternative way to solve my specific backup issues, but I thought I'd leave a working date-filtered rsync here for anyone who's interested:
ssh username@server "touch -d '2010-12-01 00:00:00' timestampfile"
ssh username@server "find ./*.fid/ -maxdepth 1 -newer timestampfile -print0" | rsync -av --files-from=- username@server:/home/user/ ~/Documents/user/RawNMRs/
精彩评论