<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> I'm  using rsync to update my local database snapshot from a remote pooled</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> mirror server. The trouble is that the servers in the pool are sometimes</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> out of date, so I only want to update when the files are newer than the</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> local copies to avoid unnecessary I/O..</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> ...</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I've found a workaround by using hard links.  Instead of:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">    cp -r <current> <new></p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">    rsync --update, <mirror> <new></p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">    mv <new> <current></p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I now:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">    mkdir <new></p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">    ln -f <current>/* <new></p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">    rsync --update, <mirror> <new></p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">    if [ <new>.<stuff> -nt <current>.<stuff> ]</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">    then mv <current> <old> ; mv <new> <current></p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">    else rm -r <new></p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">    fi</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Since the files in <new> are the same as in <current>, --update does its job properly.</p>
</body>
</html>