Add sync function for rsync.