Regarding rsync issue.

Hello All,

I was performing a data copy by using rsync command as follows.

rsync -avz -r -e 'ssh' --rsync-path=/usr/bin/rsync /test/singh_directory/dir /test/singh_directory  >> /test/singh_directory/rsync_logs.log 2>&1 
 

Command's logs are getting hung to following:

sending incremental file list
rsync: link_stat "/test/singh_directory/ssh" failed: No such file or directory (2) 

I have tried to search it in google but nothing much information on same, I had tried --progress --stats in command too but same information only.
Could anyone please help on same, will be grateful to you.

NOTE: I am on LINUX O.S. And this is on the same server but different paths, so that only user name and server name not mentioned in command above.

Thanks,
R. Singh

Hi.

Once I get an rsync command to run, I tend to forget about the complex set of options.

However, my recollection is that a trailing "/" is best to specify on source and destination directories.

Best wishes ... cheers, drl

1 Like

You said you want to copy data using rsync but the command introduces much ambiguity. Where are you trying to copy to?

The -e 'ssh' indicates that you are trying to initiate a remote connection using the ssh protocol but no host name is given, nor the arrangement of source and destination is like given.
The -a (archive) flag is a combination of many others, including -r (recursive), therefore is not necessary to have by itself.

The -z is for compression on the transmission, arguably not necessary when doing a local copy.

If we remove the -e 'ssh' we end up with a copy of a whole directory (dir) from local source to local directory (singh_directory) destination, which it has its own problems as stand. dir lives already in singh_directory .

When using / at the end of source, rsync will copy the content of the last directory.
Not using / at the end of source, rsync will copy the last directory and the content of it.

When using / at the end of destination, rsync will transfer the data inside the last directory.
Not using / at the end of destination, rsync will create a directory with the last destination name and will transfer the data inside that directory.

1 Like