How do I copy all files and folders in a folder to another server with scp?

Viewed 12

Well the question is simple but I do not know why the suggested answers in other questions did not work for me.

I have a folder foo, and there are many files and another folders in foo too and these folders have also files etc.

When I use

scp -r /Users/...localpath root@157.230....:/root/artifacts

It never ends and copies same files again and again..(This answer is given in this question but did not work for me)

If I use * instead of -r

scp /Users/...localpath/* 

Then it only copies files but not folders.

How can I copy everything to another server ?

0 Answers
Related