rsync - copy only new files ( since the last run )

Tim Conway conway at
Tue Apr 13 18:32:57 GMT 2004

rsync -options `find source -type f -name 'pattern' -newer markerfile 
-print;touch markerfile` destination

Or perhaps, since new files might appear during the process:
tosend=`find source -type f -name 'pattern' -newer markerfile -print`
rm markerfile
ln `ls -tr $tosend |tail -1` markerfile
rsync -options $tosend destination
That way, you retain your newest file sent as the cutoff.  I think there's 
a touch command to copy timestamps, but it's not handy in my head at the 
moment, and as you are obviously retaining the old logs anyway, there's no 
harm in adding a link reference... it doesn't eat much.

Tim Conway
Unix System Administration
Contractor - IBM Global Services
conway at

"Roman Kab" <rkab at> 
Sent by: at
04/13/2004 11:51 AM

<rsync at>

rsync - copy only new files ( since the last run )

    Hello everyone,

Here is what I am trying to accomplish. 


Using rsync to push journal transaction files from one server to the hot 
backup server.  Rsync script runs every 10 minutes and pushes the files . 
On the hot backup server these files are applied by a shell script. A 
purge job deletes files that have been applied from the hot backup server. 
 Unfortunately rsync pushes missing files back from primary to the hot 

Is there a way to make rsync pickup where it left of instead of pushing 
all missing files.  I understand that the inteded function of rsync is to 
sync up the dirs.   May be there is a timestamp, flag .. that I can pass.  
There are times when it is necessary to sync up but that occurs once in a 
great while.

To unsubscribe or change options:
Before posting, read:

More information about the rsync mailing list