41

In the source directory I have some symbolic links. These links point to some paths and data is present in those paths also; but using rsync it is copying only the link files, not the data that is present in the path.

lrwxrwxrwx 1 lafter lafter   58 Sep 26 16:57 8770 -> ../../../../.sites_repository/brest/8770/3.2.08.05.b-b0001
lrwxrwxrwx 1 lafter lafter   59 Sep 26 16:57 bootdvd -> ../../../../.sites_repository/colombes/bootdvd/12.1.013.000

Any solutions?

2

1 Answer 1

59

man rsync says:

-L, --copy-links    transform symlink into referent file/dir
5
  • 4
    Thanks. This copied the symbolic links target's content. May 1, 2019 at 2:57
  • macOS As soon -r is involved, it seems not to work.
    – Atalantia
    Jun 16, 2023 at 5:53
  • Works for me. What exacly doesn't work (expected/actual result)?
    – xenoid
    Jun 16, 2023 at 6:51
  • In a rsync -rL command the alias of a .mkv file transfers only 3K of the original 2.1MB
    – Atalantia
    Jun 16, 2023 at 9:41
  • Looks like a very different problem. I would expect either a full copy or nothing at all. Could be a totally unrelated cause... Otherwise it's a bug.
    – xenoid
    Jun 16, 2023 at 9:46

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