What is the problem you are having with rclone?
I am attempting to sync from a local Windows WSL2 path
\\wsl$\... to a local hard drive from Windows (via PowerShell). During this attempt, symlinks are not ignored and error with:
Failed to copy: failed to open source object: The name of the file cannot be resolved by the system.
What is your rclone version?
- os/type: windows
- os/arch: amd64
- go/version: go1.16.3
- go/linking: dynamic
- go/tags: cmount
Which OS you are using and how many bits?
Windows 10 Pro 64-bit, build 19041
Which cloud storage system are you using?
The command you were trying to run
rclone --verbose --progress sync "\\wsl$\Ubuntu\home\" "E:\sync_pc\current\wsl$\Ubuntu\home\"
rclone --verbose --progress --links sync "\\wsl$\Ubuntu\home\" "E:\sync_pc\current\wsl$\Ubuntu\home\"
The rclone config contents with secrets removed.
A log from the command with the
2021-05-07 15:43:16 ERROR : fishstik/dev/.venv/bin/python: Failed to copy: failed to open source object: The name of the file cannot be resolved by the system.
Is it possible for rclone to recognize symlinks in the WSL2 filesystem?
It is having trouble resolving the symlink, so reading it's destination.
Does this work in the command line so if you ls -l the link you can see the destination?
The output is the same with and without
rclone ls "\\wsl$\Ubuntu\home\fishstik\dev\.venv\bin\python"
rclone ls -l "\\wsl$\Ubuntu\home\fishstik\dev\.venv\bin\python"
Here is the output of
ls -l in
~/dev/.venv/bin within WSL:
$ ls -l python*
lrwxrwxrwx 1 fishstik fishstik 7 Sep 16 2020 python -> python3
lrwxrwxrwx 1 fishstik fishstik 16 Sep 16 2020 python3 -> /usr/bin/python3
Seems this is likely an issue with how the WSL2 filesystem is provided to Windows (via 9P server). Symlinks appear as empty files as viewed by Windows Explorer via the
Relevant WSL GitHub issue: access Linux symlinks from \wsl$ · Issue #5118 · microsoft/WSL (github.com)
hello and welcome to the forum,
rclone runs great on wsl2.
So it looks like it really can't read the link.
So until this is fixed, the best option is probably --skip-links
This results in the same error since rclone cannot determine if the file is a symlink and therefore will not skip it.
I have taken @asdffdsa's advice and will sync my WSL files from within WSL.
Thank you both!
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.