0

I'm trying to synchronize a set of remote files via an rsync daemon, but the resulting path is missing the initial path element.

$ rsync -HRavP ftp.ncbi.nih.gov::refseq/H_sapiens/README 2015-05-11/
receiving incremental file list
created directory 2015-05-11
H_sapiens/
H_sapiens/README
          4,850 100%    4.63MB/s    0:00:00 (xfr#1, to-chk=0/2)

sent 51 bytes  received 5,639 bytes  3,793.33 bytes/sec
total size is 4,850  speedup is 0.85

$ tree 2015-05-11/
2015-05-11/
└── H_sapiens
    └── README

Notice that the resulting tree is missing the first part of the remote path ("refseq").

I realize that I can append the first element of the remote path to the destination path, but it seems unlikely (to me) that this is the intended behavior of rsync.

It's worth noting for comparison that rsync -HRavP refseq/H_sapiens/README 2015-05-11/ (where the source is a local file) correctly creates the full relative path under the destination directory.

[Also: https://stackoverflow.com/questions/30177423/]

1
  • 1
    That's because it's not a filesystem path to begin with. You're connecting via the rsync daemon. The first part after the double-colon is the name of the module as configured in the rsync daemon. Commented May 11, 2015 at 21:09

1 Answer 1

3

When using the rsync daemon, the first part of the path is not considered a folder, but more of a repository. The rsync daemon looks up the full path to the files of this repository in its conf file and repository name is trimmed from the path on the destination. To get the behaviour you expect skip the daemon and just use ssh. If you need to get around the password setup ssh keys with 'ssh-keygen' and 'ssh-copy-id'.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.