Thursday, 3 July 2014

Mount Google Drive on Linux - google-drive-ocamlfuse

http://xmodulo.com/2013/10/mount-google-drive-linux.html
http://www.fclose.com/4687/mounting-google-drive-on-linux/

Now that I have unlimited storage with Google Drive for Work, lets get it working with Linux using excellent instructions from above link:

Install opam 
If you have not installed opam, you need to install opam first:.
# wget http://www.ocamlpro.com/pub/opam_installer.sh; sh ./opam_installer.sh /usr/local/bin
To make opam settings take effect, append this to ~/.bashrc:
eval `opam config env`
Install google-drive-ocamlfuse via opam 
You may need to install some packages on your system. On Fedora/Centos, you may need to at least install:
# yum install sqlite-devel fuse-devel libcurl-devel zlib-devel m4
opam will automatically resolve dependencies and install the needed packages:
$ opam install google-drive-ocamlfuse

Configure google-drive-ocamlfuse 

You need to run google-drive-ocamlfuse without parameters and it will request authorization:
$ google-drive-ocamlfuse
This command will create the default application directory (~/.gdfuse/default), containing the configuration file config and start a web browser to obtain authorization to access your Google Drive.

Mounting Google Drive 

After configured google-drive-ocamlfuse, you can mount the file system:
$ google-drive-ocamlfuse mountpoint
You need to be patient and it may take some time to load your files.




Update 12/8/2014:
If you using Amazon S3 you can use S3FS or S3FUSE to mount S3:
http://walkintocloud.com/2014/01/s3-bucket-mounting-as-a-file-system-in-linux-using-s3fs-and-s3fuse/
http://walkintocloud.com/2014/01/s3-bucket-performance-comparison-with-s3fs-and-s3fuse/

Update 12/2/2015 - S3QL:
https://bitbucket.org/nikratio/s3ql/
S3QL is a file system that stores all its data online using storage services like Google Storage, Amazon S3, or OpenStack. S3QL effectively provides a hard disk of dynamic, infinite capacity that can be accessed from any computer with internet access running Linux, FreeBSD or OS-X.
Here we are using the Amazon S3 backend, andnikratio-s3ql-bucket is the S3 bucket in which the file system will be stored.
mkfs.s3ql s3://nikratio-s3ql-bucket
To mount the S3QL file system stored in the S3 bucket nikratio_s3ql_bucket in the directory /mnt/s3ql, enter:
mount.s3ql s3://nikratio-s3ql-bucket /mnt/s3ql
Now you can instruct your favorite backup program to run a backup into the directory /mnt/s3ql and the data will be stored an Amazon S3. When you are done, the file system has to be unmounted with
umount.s3ql /mnt/s3ql

2 comments:

  1. To install OPAM for CentOS6/7 refer to: http://software.opensuse.org/download.html?project=home%3Aocaml&package=ocaml

    ReplyDelete
  2. Also, for CentOS7 (at least) you must install ocaml-camlp4-devel and ocaml-doc

    ReplyDelete