- reduce code duplication for rsync call