Browsing remote with symlinks

What is the problem you are having with rclone?

I'd like to use "rclone lsf" (and similar) to browse a remote, but the remote has symlinks, and "rclone lsf" only shows the *.rclonelink files, not the directories that they represent.

This is true no matter whether I use "-l", "-L", both, or neither.

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

- os/version: freebsd 13.0-release-p11 (64 bit)
- os/kernel: 13.0-release-p11 (amd64)
- os/type: freebsd
- os/arch: amd64
- go/version: go1.18.1
- go/linking: dynamic
- go/tags: none```

####  Which cloud storage system are you using? (eg Google Drive)
Google Drive, but I would also like to use it on others where I haven't tested it yet, including B2, Dropbox, Icedrive, OneDrive, PCloud, S3, and Wasabi.


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

rclone lsf GSuite:Blah/Blah/Blah


(And the same with the "-l" and/or "-L" flags)

#### The rclone config contents with secrets removed.  
<!--  You should use 3 backticks to begin and end your paste to make it readable.   -->

[Raw-GSuite]
type = drive
scope = drive
token = (...)
team_drive =

[GSuite]
type = alias
remote = Raw-GSuite:Amalgamated




#### A log from the command with the `-vv` flag  

2022/09/29 17:56:39 DEBUG : rclone: Version "v1.58.1-DEV" starting with parameters ["rclone" "lsf" "-l" "GSuite:Blah/Blah/Blah" "-vv"]
2022/09/29 17:56:39 DEBUG : Creating backend with remote "GSuite:Blah/Blah/Blah"
2022/09/29 17:56:39 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2022/09/29 17:56:39 DEBUG : Creating backend with remote "Raw-GSuite:Amalgamated/Blah/Blah/Blah"
2022/09/29 17:56:39 DEBUG : Google drive root 'Amalgamate/Blah/Blah/Blah': 'root_folder_id = (...)' - save this in the config to speed up startup
2022/09/29 17:56:40 DEBUG : fs cache: renaming cache item "GSuite:Blah/Blah/Blah" to be canonical "Raw-GSuite:Amalgamated/Blah/Blah/Blah"
bling.rclonelink
2022/09/29 17:56:40 DEBUG : 4 go routines active

Similar, perhaps related issue: In the past, I've often copied the directory tree structure from a remote without copying the files in it, using a command patched together from somewhere on this forum:

rclone copy remote:path . --min-age 50y --min-size 10000G --create-empty-src-dirs -P

But now I'm trying with symlinks on the remote (while adding the "-l" flag to the command), and it does not copy the symlinks to the local drive. I am guessing that this might be because it decides not to download the *.rclonelink files due to --min-age and --min-size. Is there some other way this sort of thing can be done when symlinks are involved?

Google drive doesn't support symlinks (it supports shortcuts which are subtly different) so the .rclonelink files are placeholders for symlinks until they are copied back into the local filing system.

You could (manually) replace the symlinks with shortcuts and if you haven't got many that might be a good solution.

The --min-size will be filtering out all the symlinks.

You could run a separate pass with --include *.rclonelink to just copy the symlinks.

Google drive doesn't support symlinks (it supports shortcuts which are subtly different) so the .rclonelink files are placeholders for symlinks until they are copied back into the local filing system.

I understand this, but I was imagining that rclone lsf would (at least if some certain flag is turned on) understand that it should read the *.rclonelink file and display the contents that it points to.

You could (manually) replace the symlinks with shortcuts and if you haven't got many that might be a good solution.

Thanks, but my intention is to have a ton of them.

The --min-size will be filtering out all the symlinks.

I understand, but again, I was imagining that rclone could (again, at least with some certain flag turned on) treat *.rclonelink files not as files, but as things that must be read to determine what further steps should be taken.

You could run a separate pass with --include *.rclonelink to just copy the symlinks.

Thanks, that sounds like a good solution for me. However, perhaps there should be a "rclone copytree" command (or some such thing) which will copy the directory structure without copying any files (and optionally dealing with symlinks, whether "real" symlinks or *.rclonelink files or what)? The current method that I know of has always been kind of convoluted and inobvious, and that was even before adding this new step in order to deal with symlinks. I, at least, do this sort of thing not-terribly-infrequently, and it would be nice to have some easy, obvious command to do so.

I just discovered "rclone ncdu", which is pretty awesome. But it seems like it would be more awesome if it too understood what *.rclonelink files are.

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