Does mounting cloud storage via WebDAV mean any app will download every file just to read metadata and list directory contents?

What is the problem you are having with rclone?

The program is not really causing any issues yet am wondering how it's handling WebDAV under the hood. I've been wanting to scan and analyse directories in Google Drive, utilising rClone for local mounting. The Google Drive program itself integrates and functions fine in Mac for daily use yet not for a couple of tasks I'm trying to do:
(am intentionally skipping over the technical observations and details of what Google Drive - no longer File Stream - and MacOS Montery are doing. TLDR; gDrive no longer appears like a typical drive/folder)

  1. Gather directory sizes and file counts
  2. Export an interactive archive of the directory/file tree

Mounting gDrive as a WebDAV drive - as I have in mind - will make my work plausible since one can tap into the usual *nix commands and mannerisms. Thus, my major concern is if the computer will attempt to download data from gDrive when trying to read file/directory metadata from what it believes to be a normal mount.

Now if this does occur, is there any way to make rClone mount gDrive like a typical mount yet still allow metadata to be read via the CLI or even fetching the folder size via Get Info (Finder)?

Programs like ForkLift and Commander One do make a good (ie. for usual, daily use) attempt at cleanly integrating online storage providers as local storage - atleast within their respective apps. I'm aware of other GUI/CLI apps that attempt to mount cloud storage as local file systems. If memory servers, they use something like FUSE to middle-layer the 'object storage' nature of cloud providers as traditional OS file systems. I believe this is what rclone mount is doing under the hood because the documentation seems to suggest this.

I'm pretty sure my technical understanding is flawed here hence the preface! Or atleast I'm asking the wrong question(s)...

It'll be really nice to achieve these efforts with the trusty ol' rClone prior to perusing for yet another solution/tool that will need to be integrated into my workflow - especially for such a niche, one-time need. rClone is extremely powerful whereby I'm always learning a new capability!

After some aimless, yet fruitful searching, it turns out what I'm after is some 'directory printer'. It outputs the file tree to something longterm like HTML or OPML. I prefer something interactive, yet standalone, rather than static since the nesting of directories and thousands of files can get pretty deep! However, I will settle for such if that's all that exists because rolling my own solution will be a monumental effort.


Examples of 'directory printers' I've discovered: Snap2HTML & FilelistCreator. Have yet to try them cos I don't want my computer blowing-up with terabytes of data streamed/downloaded from gDrive! I think I'm still learning if this is the right solution for my problem anyway.

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

On VPS
rclone v1.48.0
os/arch: linux/amd64
go version: go1.12.6

On Mac [Monterey 12.4 (21F79)]
rclone v1.59.0
os/version: darwin 12.4 (64 bit)
os/kernel: 21.5.0 (x86_64)
os/type: darwin
os/arch: amd64
go/version: go1.18.3
go/linking: dynamic
go/tags: none

Latest rClone version at time of writing is 1.62.2. You may notice I'm using the old human-readable switch.
Just about all the rclone commands were run on the VPS.

VPS version & info:
cat /etc/*-release

CentOS Linux release 7.6.1810 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.6.1810 (Core)
CentOS Linux release 7.6.1810 (Core)

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

Google Drive.

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

Please refer to the initial context, strategy and attempted solutions :slight_smile:

The rclone config contents with secrets removed.

VPS & Mac

[s9]
type = webdav
url = http://192.168.0.118:8484
vendor = other

[gUni]
type = drive
client_id = ****
client_secret = ****
scope = drive
token = {"access_token":"****","token_type":"Bearer","refresh_token":"****","****"}
team_drive =

[b1ts_n_b0bs]
type = alias
remote = /Volumes/b1ts n b0bs

[LocalDrive]
type = local

A log from the command with the -vv flag

Not Applicable


Addressing my efforts with points 1 & 2:

  • 1:
    -- The rclone ncdu command, especially with fast-list, has been helpful yet no way to export directory tree. It's certainly fantastic when exploring what and where space is being taken!
    -- Although I'm not after an ASCI-tree as plain text, playing around with a command like rclone tree -d gUni: --size --human -L didn't yield results because it couldn't display folder sizes
    -- rclone size only calculates total size of path

  • 2:
    -- Being able to nicely mount Google Drive without fetching the actual data would mean I could use one of these programs to creative an archival directory/filetree.
    -- I vaguely recall occasionally reading discussions on people attempting to optimise some caching thing and file system thing to optimise streaming of data without permanent local storage. This implies to me that data is being fetched from the cloud storage provider, causing havoc if attempting to trawl terabytes of data over a network. A common purpose of those discussions were for Plex + gDrive and the like. I believe this avenue is overkilll for my niche need.

Once again, please don't hesitate to inform if this post is chaotic, asking too many questions at once, the wrong questions, or in the incorrect topic. I'm just pretty sure rClone can do what's initially need. Need being making gDrive look like a normal drive so another program can takeover to complete the aforementioned solution and/or if it can assist in creating the directory tree desired . I hope the context and externalised thinking compensates for the weaving of diagnostic information and desired solutions!

Quick example of rclone tree LocalDrive: --size --human -L -d | head -50 showing empty directories:

[   0]  /
├── [   0]  Lukes-Timesheet
│   ├── [   0]  __pycache__
│   ├── [   0]  resources
│   └── [   0]  venv
│       ├── [   0]  bin
│       ├── [   0]  include
│       ├── [   0]  lib
│       │   └── [   0]  python3.6
│       │       └── [   0]  site-packages
│       │           ├── [   0]  __pycache__
│       │           ├── [   0]  aiohttp
│       │           │   └── [   0]  __pycache__
│       │           ├── [   0]  aiohttp-3.6.3.dist-info
│       │           ├── [   0]  async_timeout
│       │           │   └── [   0]  __pycache__
│       │           ├── [   0]  async_timeout-3.0.1.dist-info
│       │           ├── [   0]  attr
│       │           │   └── [   0]  __pycache__
│       │           ├── [   0]  attrs-19.3.0.dist-info
│       │           ├── [   0]  certifi
│       │           │   └── [   0]  __pycache__
│       │           ├── [   0]  certifi-2019.9.11.dist-info
│       │           ├── [   0]  chardet
│       │           │   ├── [   0]  __pycache__
│       │           │   └── [   0]  cli
│       │           │       └── [   0]  __pycache__
│       │           ├── [   0]  chardet-3.0.4.dist-info
│       │           ├── [   0]  discord
│       │           │   ├── [   0]  __pycache__
│       │           │   ├── [   0]  bin
│       │           │   └── [   0]  ext
│       │           │       ├── [   0]  commands
│       │           │       │   └── [   0]  __pycache__
│       │           │       └── [   0]  tasks
│       │           │           └── [   0]  __pycache__
│       │           ├── [   0]  discord.py-1.5.0.dist-info
│       │           ├── [   0]  idna
│       │           │   └── [   0]  __pycache__
│       │           ├── [   0]  idna-2.8.dist-info
│       │           ├── [   0]  idna_ssl-1.1.0-py3.6.egg-info
│       │           ├── [   0]  multidict
│       │           │   └── [   0]  __pycache__
│       │           ├── [   0]  multidict-4.5.2.dist-info
│       │           ├── [   0]  pip
│       │           │   ├── [   0]  __pycache__
│       │           │   ├── [   0]  _internal
│       │           │   │   ├── [   0]  __pycache__
│       │           │   │   ├── [   0]  cli
│       │           │   │   │   └── [   0]  __pycache__

...

rclone tree LocalDrive: --size --human -L -d | tail -50

    ├── [   0]  archetypes
    ├── [   0]  content
    │   ├── [   0]  post
    │   │   └── [   0]  resources
    │   │       └── [   0]  _gen
    │   │           ├── [   0]  assets
    │   │           └── [   0]  images
    │   └── [   0]  posts
    ├── [   0]  data
    ├── [   0]  layouts
    ├── [   0]  public
    │   ├── [   0]  categories
    │   ├── [   0]  css
    │   ├── [   0]  img
    │   ├── [   0]  js
    │   ├── [   0]  page
    │   │   └── [   0]  1
    │   ├── [   0]  post
    │   │   └── [   0]  about
    │   └── [   0]  tags
    ├── [   0]  resources
    │   └── [   0]  _gen
    │       ├── [   0]  assets
    │       └── [   0]  images
    ├── [   0]  static
    └── [   0]  themes
        └── [   0]  hugo-nederburg-theme
            ├── [   0]  archetypes
            ├── [   0]  exampleSite
            │   ├── [   0]  content
            │   │   ├── [   0]  about
            │   │   ├── [   0]  contact
            │   │   └── [   0]  post
            │   ├── [   0]  layouts
            │   └── [   0]  static
            │       └── [   0]  img
            │           └── [   0]  portfolio
            ├── [   0]  images
            ├── [   0]  layouts
            │   ├── [   0]  _default
            │   ├── [   0]  about
            │   ├── [   0]  contact
            │   ├── [   0]  partials
            │   └── [   0]  taxonomy
            └── [   0]  static
                ├── [   0]  css
                ├── [   0]  img
                └── [   0]  js

0 directories

Hope this helps!

Run the command 'rclone version' and share the full output of the command.
On VPS
rclone v1.48.0
os/arch: linux/amd64
go version: go1.12.6

Rclone version 1.48.0 is years old and probably misses the features needed for streaming parts of files without full file downloads (I don't know exactly in what version the file streaming capabilities were introduced but I think after that version). Best to upgrade to the newest 1.62.2 from Rclone downloads

Oh dear, thanks for the insight! I will be running rClone locally - for the mount - so will try to update that one.

How does filestreaming work with rClone? I don't need the files on the computer, just the metatadata, indexing, directory count, that sort of thing.

Thanks for your help!

great!

rclone can stream direct from cloud. zero data stored on your local hard drive.
the metadata and such is stored in memory.

in some cases, direct from cloud, does not work well, need to use the rclone file cache.
which will store data on your local hard drive.

This sounds great. So can I mount a drive, contents showing in Finder ofcourse, and still read the metadata without actually downloading the file?

I would love to be able to run a disk usage utility program like Disk Inventory X without the actual files being pulled. This is what happens when I try scanning the current native Google Drive streaming app - it's no longer under /Volumes or in Network.

Yes it should only read the metadata.

If Disk Inventory X does not open the file then rclone won't download it.

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