-2

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/* [email protected]:~/apps/test-rsync 
[email protected]'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]
4
  • i have checked the server for the path Mar 21, 2018 at 18:38
  • But did you check if "user" has permissions to read and write to the source and target directories? [ These could be blocked by filesystem perms or SELinux or equivalent ]
    – davidgo
    Mar 21, 2018 at 20:06
  • Yes user has the permission Mar 21, 2018 at 20:13
  • Whaat Distro are you using, and have you tried disabling selinux, or looked at the log files on the destination system?
    – davidgo
    Mar 21, 2018 at 20:23

1 Answer 1

2

Your command is:

rsync -u -avze ssh /apps/container-log/* [email protected]:~/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/* [email protected]: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/* [email protected]: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/* [email protected]:apps/test-rsync
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .