How to uploads in to Google Drive with Rclone Mount

STOP and READ USE THIS TEMPLATE NO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.

What is the problem you are having with rclone?

I have rclone mount running with full cache mode but not exactly sure what I need to do to upload the files into gdrive?
I am using rsync to upload the files into gdrive but not sure if I am over complicating the process :slight_smile:

rsync -av /mnt/local/file1.txt /mnt/gdrive/

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

rclone v1.61.1

  • os/version: ubuntu 18.04 (64 bit)
  • os/kernel: 4.15.0-197-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.19.4
  • go/linking: static
  • go/tags: none

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)

[Unit]
Description=Rclone
Wants=network-online.target
After=network-online.target

[Service]
Type=notify
Environment=RCLONE_CONFIG=/home/ezio/.docker/appdata/rclone/rclone.conf
RestartSec=5
ExecStart=/usr/bin/rclone mount gdrive: /mnt/gdrive \
--dir-cache-time 5m \
--log-file /home/ezio/.docker/appdata/rclone/rclone.log \
--log-level INFO \
--umask 002 \
--rc \
--rc-addr 127.0.0.1:5574 \
--rc-no-auth \
--cache-dir=/mnt/.rclone_cache \
--vfs-cache-mode full \
--vfs-cache-max-size 7500G \
--vfs-fast-fingerprint \
--vfs-read-chunk-size 32M \
--vfs-write-back 1h \
--vfs-cache-max-age 1h \
--tpslimit 12 \
--tpslimit-burst 0 \
--bwlimit 8.5M \
--bind 192.168.1.232 \
--disable-http2
ExecStop=/bin/fusermount -uz /mnt/gdrive
ExecStartPost=/usr/bin/rclone rc vfs/refresh recursive=true --url 127.0.0.1:5574 _async=true
Restart=on-failure
User=ezio
Group=ezio

[Install]
WantedBy=multi-user.target

The rclone config contents with secrets removed.

[gdrive]
type = drive
client_id = xxxx
client_secret = xxx
scope = drive
token = xxx
root_folder_id = xxx

A log from the command with the -vv flag

Paste  log here

using rclone mount, you can use any app/tool/utility you want.
it depends on your use-case.

another option is direct to cloud, using rclone copy, not rclone mount
rclone copy /mnt/local/file1.txt gdrive: -vv --dry-run

Thank you and that completely make sense :innocent:

One quick question :slight_smile:

If cache dir is on the same system where files are stored then files should transfer instantly? Reason I have asked because rclone is running locally on ssd and cache directory on samba share and data is also on samba share.

rsync -av /mnt/samba/data /mnt/gdrive

cache dir /mnt/samba/.rclone_cache
data dir /mnt/samba/data
gdrive /mnt/gdrive

Thanks

there is a delay controlled by:
--vfs-write-back duration Time to writeback files after last use when using cache (default 5s)

Thanks for clarifying. Much appreciated.

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