rsync not creating subdirectories

I am using the following command to rsync files from my old server to my linode server. However this command is not copying directories beneath /home/example/dir1/dir2/ to my linode server. It is my belief that the -a rsync parameter should direct rsync to create those directories, but it is not happening. Do you folks have any ideas?

/usr/bin/rsync -auvz --stats --checksum -e "/usr/bin/ssh -p 1234"user@www.domain.net:/home/example/dir1/dir2/* .  

2 Replies

I figured out what was wrong. The command was not formatted correctly.

Bad:

/usr/bin/rsync -auvz --stats --checksum -e "/usr/bin/ssh -p 1234"user@www.domain.net:/home/example/dir1/dir2/* .

Good:

/usr/bin/rsync -auvz --stats --checksum -e "/usr/bin/ssh -p 1234" user@www.domain.net:/home/example/dir1/dir2/* .

Yes that space can cause issue, I'm glad that you got it fixed :)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct