Scp only a specific folder

Posted by Ben on Server Fault See other posts from Server Fault or by Ben
Published on 2012-10-13T09:58:25Z Indexed on 2012/10/13 15:41 UTC
Read the original article Hit count: 194

Filed under:
|

Some command line syntax I don't know how to set, am a noob sometimes, sorry is that's obvious

Let's says I have the following path for all my assets :

/var/www/site/system/images/{image_id}/{format}/{file}.{extension}

Inside the {image_id} folder, I have multiple formats (original, medium, thumb, etc...).

I only want to import the /var/www/site/system/images/{image_id}/original folder, and keep the structure locally

scp -r username@server:/var/www/site/system/images/*/original ~/Site/site/system/images

This one does get it all, but all the files end up in the same and unique folder, no structure.

I'd like to keep the structure. Is there something to do for it ?

© Server Fault or respective owner

Related posts about scp

Related posts about folder