0

I have Ubuntu installed on a VM on my PC. I need to copy some folder ( recursively ) from Ubuntu to the server.

If I want to download the folders from the server to my VM machine I did this:

rsync -av [email protected]:/home/my_folder ./

my_folder contains other folders and files. What if I want to upload a folder to the server ?

Hope is clear

1 Answer 1

1

You'd just need to switch the arguments (which represent source and destination) like

rsync -av ./newfolder [email protected]:/home/my_folder

Have a look at man rsync which explains that a trailing slash after newfolder would only transfer the contents of said directory - in this case, you might want to change the upload destination to .../my_folder/newfolder.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.