rsync only certain files


Create a file on on the origin server and use the –files-from option

cd /
rsync -anvi --files-from=/tmp/only_these_files . to-server:/

cat /tmp/only_these_files
/srv/www/mysite/uploaded_files/9a3d3d9046aaad4bbe3074d794a6adaf.jpg
/srv/www/mysite/uploaded_files/5ca1c97efd730427f846e457bd0a0667.png
/srv/www/mysite/uploaded_files/5b0923025b4a1fde3a34119bfcd56567.jpg
/srv/www/mysite/uploaded_files/870ed45d9ad704deace8fb541242425a.jpg
,

Leave a Reply

Your email address will not be published. Required fields are marked *