WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to mount a Google drive  (Read 308 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10363
How to mount a Google drive
« on: November 06, 2022, 07:33:26 PM »
I recently suggest to a forum member they might want to consider mounting
a Google drive for extra storage. Although I have no interest in storing any
data in "the cloud", I decided to see just how involved the process was.

It turned out to be relatively straight forward. A search turned up several
programs available for the task. I decided to try rclone for this experiment.

While they do have a github page, I went with one of the precompiled
packages.

Precompiled statically linked (no deps) rclone can be found here:
http://downloads.rclone.org/

I used the 32 bit version V1.60.0:
https://downloads.rclone.org/v1.60.0/rclone-v1.60.0-linux-386.zip
For 64 bit use:
https://downloads.rclone.org/v1.60.0/rclone-v1.60.0-linux-amd64.zip

There are also ARM versions available:
https://downloads.rclone.org/v1.60.0/rclone-v1.60.0-linux-arm.zip
https://downloads.rclone.org/v1.60.0/rclone-v1.60.0-linux-arm-v7.zip
https://downloads.rclone.org/v1.60.0/rclone-v1.60.0-linux-arm64.zip

The attached file shows the steps I took and the responses from rclone.
It shows how I fixed the SSL certificate error.
It includes the above links as well as a link to the guide I used when
creating the attachment.

If you have a Gmail account, you should already have a 15 Gigabyte
Google drive included. Saved emails count against the free space
on that drive.
« Last Edit: November 06, 2022, 07:51:20 PM by Rich »

Offline TT

  • Newbie
  • *
  • Posts: 45
Re: How to mount a Google drive
« Reply #1 on: November 06, 2022, 09:41:55 PM »
Also very convenient, albeit heavier − requiring libcurl-gnutls precompiled binaries are on PPA − for those interested: https://github.com/astrada/google-drive-ocamlfuse

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 646
Re: How to mount a Google drive
« Reply #2 on: November 07, 2022, 01:55:27 AM »
Thanks.

Also recently discovered a long lost fact.

My ISP service provides me with a "free" cloud drive of 10 gigs and the web interface into it.

Meaning to say, the following are thrown in free with my regular DSL bill

1) 10 gig cloud drive with web interface.
2) "free wi fi"   European wide.
( millions of locations)



A "cloud drive" together with a "PEN DRIVE"  gives me a second and a third location to store backups.....

Those locations are in addition to the "First location" which is inside the host computers HDD itself.
(3 locations in total)

Thx,
C.
« Last Edit: November 07, 2022, 02:08:31 AM by vinceASPECT »

Offline gadget42

  • Sr. Member
  • ****
  • Posts: 412
Re: How to mount a Google drive
« Reply #3 on: November 07, 2022, 06:01:13 AM »
huge kudos and thanks to @Rich for sharing his experience, knowledge, and time!
The fluctuation theorem has long been known for a sudden switch of the Hamiltonian of a classical system Z54 . For a quantum system with a Hamiltonian changing from... https://forum.tinycorelinux.net/index.php/topic,25972.msg166580.html#msg166580

Offline TT

  • Newbie
  • *
  • Posts: 45
Re: How to mount a Google drive
« Reply #4 on: November 07, 2022, 09:23:08 AM »
I think it is important to consult https://en.wikipedia.org/wiki/Rclone#Rclone_or_rsync
Rclone (RC) "does not currently preserve permissions and attributes". For me even xattr's are important since I'm a fan of FarManager's Files.bbs (far2l in Linux!). It looks like RC does sync (edit: or does it also mount? I'm a bit overloaded), while google-drive-ocamlfuse actually mounts Google Drive. I didn't have time to explore if permissions and attributes are being honored. Some time ago Andrew File System (AFS) was poised for most convenient "an Internet file system", didn't know what is their status quo now.

P.S. This one looks candy: https://github.com/kapitainsky/RcloneBrowser
« Last Edit: November 07, 2022, 09:41:45 AM by TT »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10363
Re: How to mount a Google drive
« Reply #5 on: November 07, 2022, 11:41:41 AM »
Hi TT
... It looks like RC does sync (edit: or does it also mount? ...
It does a lot of things. I only used it for mounting the remote drive.

Quote
... Rclone (RC) "does not currently preserve permissions and attributes". ...
Since I only used the mount function, preserving attributes is a function of the flags passed
to the cp command (as well as the filesystem type used):
Code: [Select]
tc@E310:~/rclone/rclone-v1.60.0-linux-386$ ./rclone mount gdrive678: gdrive/ &
tc@E310:~/rclone/rclone-v1.60.0-linux-386$ 2022/11/07 13:59:13 NOTICE: Time may be set wrong - time from "oauth2.googleapis.com" is -4h59m57.355112062s different from this computer
2022/11/07 13:59:13 NOTICE: Time may be set wrong - time from "www.googleapis.com" is -4h59m58.076749561s different from this computer

tc@E310:~/rclone/rclone-v1.60.0-linux-386$ cp -p * gdrive/
cp: -r not specified; omitting directory 'gdrive'
tc@E310:~/rclone/rclone-v1.60.0-linux-386$ ls -l
total 49164
-rw-r--r-- 1 tc staff  2028110 Oct 21 14:07 README.html
-rw-r--r-- 1 tc staff  1651860 Oct 21 14:07 README.txt
-rw-r--r-- 1 tc staff     9594 Nov  6 21:42 RcloneSetup.txt
drwxr-xr-x 1 tc staff        0 Nov  7 13:59 gdrive/
-rw-r--r-- 1 tc staff    50587 Oct 21 14:18 git-log.txt
-rwxr-xr-x 1 tc staff 44740608 Oct 21 14:21 rclone
-rw-r--r-- 1 tc staff  1850177 Oct 21 14:07 rclone.1
tc@E310:~/rclone/rclone-v1.60.0-linux-386$ ls -l gdrive/
total 52100
-rw-r--r-- 1 tc staff  3017667 Jul  4  2015 'How to get started with Drive'
-rw-r--r-- 1 tc staff  2028110 Oct 21 14:07  README.html
-rw-r--r-- 1 tc staff  1651860 Oct 21 14:07  README.txt
-rw-r--r-- 1 tc staff     9594 Nov  6 21:42  RcloneSetup.txt
-rw-r--r-- 1 tc staff    50587 Oct 21 14:18  git-log.txt
-rw-r--r-- 1 tc staff 44740608 Oct 21 14:21  rclone
-rw-r--r-- 1 tc staff  1850177 Oct 21 14:07  rclone.1
tc@E310:~/rclone/rclone-v1.60.0-linux-386$
Both copies have the same attributes. README.html, README.txt, and rclone.1 are
user manuals provided in different formats.

There's also some built in help:
Code: [Select]
tc@E310:~/rclone/rclone-v1.60.0-linux-386$ ./rclone --help

Rclone syncs files to and from cloud storage providers as well as
mounting them, listing them in lots of different ways.

See the home page (https://rclone.org/) for installation, usage,
documentation, changelog and configuration walkthroughs.

Usage:
  rclone [flags]
  rclone [command]

Available Commands:
  about           Get quota information from the remote.
  authorize       Remote authorization.
  backend         Run a backend-specific command.
  bisync          Perform bidirectional synchronization between two paths.
  cat             Concatenates any files and sends them to stdout.
  check           Checks the files in the source and destination match.
  checksum        Checks the files in the source against a SUM file.
  cleanup         Clean up the remote if possible.
  completion      Generate the autocompletion script for the specified shell
  config          Enter an interactive configuration session.
  copy            Copy files from source to dest, skipping identical files.
  copyto          Copy files from source to dest, skipping identical files.
  copyurl         Copy url content to dest.
  cryptcheck      Cryptcheck checks the integrity of a crypted remote.
  cryptdecode     Cryptdecode returns unencrypted file names.
  dedupe          Interactively find duplicate filenames and delete/rename them.
  delete          Remove the files in path.
  deletefile      Remove a single file from remote.
  genautocomplete Output completion script for a given shell.
  gendocs         Output markdown docs for rclone to the directory supplied.
  hashsum         Produces a hashsum file for all the objects in the path.
  help            Show help for rclone commands, flags and backends.
  link            Generate public link to file/folder.
  listremotes     List all the remotes in the config file.
  ls              List the objects in the path with size and path.
  lsd             List all directories/containers/buckets in the path.
  lsf             List directories and objects in remote:path formatted for parsing.
  lsjson          List directories and objects in the path in JSON format.
  lsl             List the objects in path with modification time, size and path.
  md5sum          Produces an md5sum file for all the objects in the path.
  mkdir           Make the path if it doesn't already exist.
  mount           Mount the remote as file system on a mountpoint.
  move            Move files from source to dest.
  moveto          Move file or directory from source to dest.
  ncdu            Explore a remote with a text based user interface.
  obscure         Obscure password for use in the rclone config file.
  purge           Remove the path and all of its contents.
  rc              Run a command against a running rclone.
  rcat            Copies standard input to file on remote.
  rcd             Run rclone listening to remote control commands only.
  rmdir           Remove the empty directory at path.
  rmdirs          Remove empty directories under the path.
  selfupdate      Update the rclone binary.
  serve           Serve a remote over a protocol.
  settier         Changes storage class/tier of objects in remote.
  sha1sum         Produces an sha1sum file for all the objects in the path.
  size            Prints the total size and number of objects in remote:path.
  sync            Make source and dest identical, modifying destination only.
  test            Run a test command
  touch           Create new file or change file modification time.
  tree            List the contents of the remote in a tree like fashion.
  version         Show the version number.

Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.
tc@E310:~/rclone/rclone-v1.60.0-linux-386$