Rclone -l cloning symlink file problem

What is the problem you are having with rclone?

rclone can not handle a single symlink file upload unless .rclonelink is attached to the copyto command

Run the command 'rclone version' and share the full output of the command.

rclone v1.66.0

  • os/version: fedora 36 (64 bit)
  • os/kernel: 6.1.15-100.fc36.x86_64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.22.1
  • go/linking: static
  • go/tags: none
yes

Which cloud storage system are you using? (eg Google Drive)

onedrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone copyto symlinkfile  onedrive:/sample --verbose -l

it makes me use:

rclone copyto symlinkfile.rclonelink  onedrive:/sample --verbose -l

The rclone config contents with secrets removed.


A log from the command with the -vv flag

2024/03/27 10:35:40 DEBUG : local: detected overridden config - adding "{b6816}" suffix to name
2024/03/27 10:35:40 Failed to create file system for "linktoemptytxtfile.yaml": need ".rclonelink" suffix to refer to symlink when using -l/--links

This is expected behaviour.

When using -l rclone sees the file as called symlinkfile.rclonelink and you need to use that name to access it.

If you do rclone lsf -l . you can see what rclone thinks the local files are called.

This should be mentioned in the docs for links I think.

I did in the past attempt to put in a workaround for this, but it turned out to be too difficult as the different layers of rclone got confused as to what the file was called (symlinkfile or symlinkfile.rclone which is what you want the file to be called on the destination).

1 Like

I think the example in the doc is wrong:

rclone copyto -l /tmp/a/file1 remote:/tmp/a/

is explained as a complete copy of folder a.
this name edition needs to be done manually only if the command is called for a single symlink, otherwise rclone append .rclonelink to to the symlinks in the subfolders and uploads them.

Yes you are right.

I have updated and expanded the docs here - thank you for reporting the problem.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.