You might want to look at:
In reply to Re: rsync workalike by adrianh in thread rsync workalike by NiJo