2

I want to use rsync to make a copy of a folder that contains symlinks to other files in the same folder. Is it possible to get updated symlinks -pointing to absolute paths- in the destination?

I mean, having this in the source folder:

source
├── file1
└── subfolder
    └── symlink2file1 -> /absolute/path/to/source/file1

I want in the destination folder:

destination
├── file1
└── subfolder
    └── symlink2file1 -> /absolute/path/to/destination/file1

I need this behaviour because eventually I may remove the source folder.

1 Answers1

2

Unfortunately it is not possible to automatically update absolute symlink targets with rsync.

A possible solution would be to convert absolute symlinks to relative symlinks in your source folder. You can check this thread for how to do so.

Emilio
  • 36
  • 1