I am new to Linux and I am using rsync in order copy logs from one server to another but the command I am running says directory not found. What is going wrong?
001 rsync -u -avze ssh /apps/container-log/* :~/apps/test-rsync 's password: sending incremental file list rsync: change_dir#3 "/local_home/user/apps" failed: No such file or directory (2) rsync error: errors selecting input/output files, dirs (code 3) at main.c(614) [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(605[sender=3.0.9] 101 Answer
Your command is:
rsync -u -avze ssh /apps/container-log/* :~/apps/test-rsync I would suggest you just remove the ~/ from the destination. And try it like this:
rsync -u -avze ssh /apps/container-log/* :apps/test-rsync But I am not too sure about the options you have setup, so I would recommend you use this command instead:
rsync -avz /apps/container-log/* :apps/test-rsync And even us the --dry-run option to see what the command will do without actually running it:
rsync -avz --dry-run /apps/container-log/* :apps/test-rsync 0