How to sync "symbolic links" in linux?
- Posts: 4
- Joined: 9 Sep 2020
Hi there!
I've just installed FFS and it seems really great. However, I'm trying to sync two linux machines and I cannot find, for my life, a way to sync symbolic links (which I want to be identical in both machines). I always get the error message "Operation not supported between different devices."
I've ticked "Direct" in "Include symbolic links" in the Synchronizing Settings.
Can someone, please, advice? Many thanks!
I've just installed FFS and it seems really great. However, I'm trying to sync two linux machines and I cannot find, for my life, a way to sync symbolic links (which I want to be identical in both machines). I always get the error message "Operation not supported between different devices."
I've ticked "Direct" in "Include symbolic links" in the Synchronizing Settings.
Can someone, please, advice? Many thanks!
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
What is the full error message?
- Posts: 4
- Joined: 9 Sep 2020
Hi Zenju,
The full message is:
Cannot copy symbolic link "sftp://server/folder/link" to "/folder/link".
Operation not supported between different devices.
Any ideas?
The full message is:
Cannot copy symbolic link "sftp://server/folder/link" to "/folder/link".
Operation not supported between different devices.
Any ideas?
- Posts: 4
- Joined: 9 Sep 2020
More details, in case it helps: I'm using FreeFileSync 11.1 on Linux Mint 20 Cinnamon...
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
FreeFileSync should support this. => ToDo
- Posts: 4
- Joined: 9 Sep 2020
Thank you , Zenju!
Just for reference, in case some one else is in the same situation, I'm syncing the symbolic links in the meanwhile using rsync:
rsync -avzu -e ssh "remotehost:/path/remotesymlink" "/path/localsynmlink"
(see rsync man page for details...)
Just for reference, in case some one else is in the same situation, I'm syncing the symbolic links in the meanwhile using rsync:
rsync -avzu -e ssh "remotehost:/path/remotesymlink" "/path/localsynmlink"
(see rsync man page for details...)
- Posts: 2
- Joined: 13 Jan 2021
Hello,
Any update about this issue? I'm trying to copy symbolic links between 2 devices and the error message is :
Info : Creating symbolic link "/mnt/whatever"
Error : Cannot copy symbolink link
"sftp://mnt/whatever to /mnt/whatever".
Operation not supported between different devices.
I'm using FreeFileSync 11.5 on Debian 10 with "Direct" box ticked
Thank you for your wonderfull software !
Any update about this issue? I'm trying to copy symbolic links between 2 devices and the error message is :
Info : Creating symbolic link "/mnt/whatever"
Error : Cannot copy symbolink link
"sftp://mnt/whatever to /mnt/whatever".
Operation not supported between different devices.
I'm using FreeFileSync 11.5 on Debian 10 with "Direct" box ticked
Thank you for your wonderfull software !
- Posts: 49
- Joined: 7 Nov 2020
I second this request to be able to sync symbolic links from (in my case) Linux to Windows. A Linux symbolic link should result at Windows in the file the link is pointing to.
Thanks a lot!
Thanks a lot!
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
This should already work. See "Symbolic Link Handling": https://freefilesync.org/manual.php?topic=comparison-settingsI second this request to be able to sync symbolic links from (in my case) Linux to Windows. A Linux symbolic link should result at Windows in the file the link is pointing to. mdrmdr, 15 Jan 2021, 11:17
- Posts: 49
- Joined: 7 Nov 2020
Unfortunately not. I get "Operation not supported between different devices." I included symbolic links as "direct". I use FFS 11.5 on Windows and access Linux via ftp.
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
So this is also SFTP => Windows?Unfortunately not. I get "Operation not supported between different devices." I included symbolic links as "direct". mdrmdr, 15 Jan 2021, 12:25
- Posts: 49
- Joined: 7 Nov 2020
Not SFTP, standard FTP.
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
You need to set symlink handling to "follow".
- Posts: 49
- Joined: 7 Nov 2020
No success. Then I get many errors like
CURLE_FTP_COULDNT_RETR_FILE: RETR response: 550
550 '/opt/automation/config_links/000-default-ssl.conf' is not a directory [curl_easy_perform]
- Posts: 2
- Joined: 13 Jan 2021
Syncing symbolic links between 2 linux boxes would be very nice :)
- Posts: 49
- Joined: 7 Nov 2020
FileZilla also shows the 550 error:
But then it does not stop and just copies the linked file....
Command: CWD 000-default-le-ssl.conf
Answer: 550 000-default-le-ssl.conf: Not a directory
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
Indeed. The FTP protocol is very limited compared to SFTP regarding symlinks but FreeFileSync might be able to do something about this => ToDoFileZilla also shows the 550 error:But then it does not stop and just copies the linked file.... mdrmdr, 15 Jan 2021, 12:51Command: CWD 000-default-le-ssl.conf
Answer: 550 000-default-le-ssl.conf: Not a directory
- Posts: 49
- Joined: 7 Nov 2020
:-)
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
Implemented! FreeFileSync now handles symbolic links pointing to files via FTP (before it only supported links pointing to directories)The FTP protocol is very limited compared to SFTP regarding symlinks but FreeFileSync might be able to do something about this => ToDo Zenju, 15 Jan 2021, 16:06
https://www.mediafire.com/file/o9m2m2y0c61al7w/FreeFileSync_11.6_%255BBeta%255D_Windows_Setup%25284%2529.exe
- Posts: 49
- Joined: 7 Nov 2020
Installed 11.6 Beta and still the same error "Operation not supported between different devices". German error message attached.
- Attachments
-
- FFS.jpg (38.68 KiB) Viewed 3672 times
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
You still need to set symlink handling to "follow".
- Posts: 49
- Joined: 7 Nov 2020
If I set it to "follow", I get this error for each linked file:
- Attachments
-
- FFS2.jpg (40.9 KiB) Viewed 3668 times
- Posts: 49
- Joined: 7 Nov 2020
In the affected directory on my Raspberry, I have links to files and directories. I'd like to only sync the linked files, not the directories. Excluding the directories still gives the above error.
Actually I would expect the following behaviour:
• "direct": sync linked files and ignore linked directories
• "follow": sync the whole tree of a linked directory (possibly with a "depth" parameter?) and sync linked files
Therefore I'd prefer "direct" with the above behaviour or "follow" with "depth=0"
Actually I would expect the following behaviour:
• "direct": sync linked files and ignore linked directories
• "follow": sync the whole tree of a linked directory (possibly with a "depth" parameter?) and sync linked files
Therefore I'd prefer "direct" with the above behaviour or "follow" with "depth=0"
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
It seems "fullchain.pem" is incorrectly considered a directory. Here's a debug version of FreeFileSync, which error details do you get?If I set it to "follow", I get this error for each linked file: mdrmdr, 16 Jan 2021, 13:06
https://www.mediafire.com/file/t7mj94453u3zbs5/FreeFileSync_11.6_%255BBeta%255D_Windows_Setup%25285%2529.exe
- Posts: 49
- Joined: 7 Nov 2020
Same "is not a directory" error during "compare" as before for any linked file with "follow". No further details. Where should I see more details?
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
Did you run the same test case? I've added code if the item name is "fullchain.pem" and FreeFileSync will show a different error message. Also check you're really running the correct beta and not some other version.
- Posts: 49
- Joined: 7 Nov 2020
Now, the only link to be synced is:
cert -> /etc/letsencrypt/live/dyn.xxx.de/ (link)
Within "/etc/letsencrypt/live/dyn.xxx.de/":
fullchain.pem -> ../../archive/dyn.xxx.de/fullchain450.pem (file)
This gives:
If (for debugging only):
cert -> fullchain.pem (file)
it works and FFS syncs the the path "cert -> fullchain.pem"
So it seems that FFS only is able to follow 1 level?
if (for debugging only):
fullchain.pem -> /etc/letsencrypt/live/dyn.xxx.de/fullchain.pem (file)
I get:
cert -> /etc/letsencrypt/live/dyn.xxx.de/ (link)
Within "/etc/letsencrypt/live/dyn.xxx.de/":
fullchain.pem -> ../../archive/dyn.xxx.de/fullchain450.pem (file)
This gives:
If (for debugging only):
cert -> fullchain.pem (file)
it works and FFS syncs the the path "cert -> fullchain.pem"
So it seems that FFS only is able to follow 1 level?
if (for debugging only):
fullchain.pem -> /etc/letsencrypt/live/dyn.xxx.de/fullchain.pem (file)
I get:
- Posts: 49
- Joined: 7 Nov 2020
Upate: Now the attachments of the above post are correct...
--
(There seems to be an attachment inlining problem at your board. The second picture after "I get" should be
FFS4 not FFS3 again...)
--
(There seems to be an attachment inlining problem at your board. The second picture after "I get" should be
FFS4 not FFS3 again...)
- Posts: 49
- Joined: 7 Nov 2020
But again: My standard case is to follow links down just by one level to exactly one file. If a link points to a directory, the danger under Linux is, that a huge tree is affected. Therefore I'd exclude links to directories and only let FFS sync links which directly points to a file. For the above debugging example, I had to move some files out of "/etc/letsencrypt/live/dyn.xxx.de" so that FFS only finds "fullchain.pem".
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
This is either:Now, the only link to be synced is:
cert -> /etc/letsencrypt/live/dyn.xxx.de/ (link)
Within "/etc/letsencrypt/live/dyn.xxx.de/":
fullchain.pem -> ../../archive/dyn.xxx.de/fullchain450.pem (file)
This gives: [SIZE: 550] mdrmdr, 16 Jan 2021, 14:49
1. an issue with the FTP server: it cannot find the file at /opt/automation/config_links/cert/fullchain.pem although it should, or...
2. /opt/automation/config_links/cert/fullchain.pem is a broken symlink
This is FFS's new file-symlink support => okayIf (for debugging only):
cert -> fullchain.pem (file)
it works and FFS syncs the the path "cert -> fullchain.pem"
So it seems that FFS only is able to follow 1 level? mdrmdr, 16 Jan 2021, 14:49
This is also FFS's new file-symlink support => okayif (for debugging only):
fullchain.pem -> /etc/letsencrypt/live/dyn.xxx.de/fullchain.pem (file)
I get: [SIZE: 213] mdrmdr, 16 Jan 2021, 14:49
(the error message only comes up because it is the debug version)