Rsync down works. error with rsync up

wordpress

#1

trying to rsync down local copy of wordpress uploads folder.

That works… but then trying to sync back up…

or

does not work. i get different errors. what am i doing wrong.

rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]

rsync: mkdir “/home/user/mydomain.com/wp-content/uploads/*” failed: No such file or directory (2)

rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]

rsync: connection unexpectedly closed (8 bytes received so far)

rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]


#2

You need to specify "user@example.com:" before the destination path on the last two commands. Otherwise rsync thinks you’re trying to synchronize two folders both on your own machine, which doesn’t work because your machine doesn’t have a “/home” directory.


#3

ah… that’s better. can’t believe i missed that. what’s up with the .? Seems to work better without that. i had a test blank folder locally however that shows up in the verbose list but i dont see that it made it online. what am i doing wrong?


#4

ah… just needed to remove the * glob on sync back up… seems to work.

#sync down
rsync -avz user@host.com:/home/user/host.com/wp-content/uploads/* /Users/user/Desktop/testuploads/

#sync up
rsync -avz /Users/user/Desktop/testuploads/*  user@host.com:/home/user/host.com/wp-content/uploads/