Google Drive is an indispensable part of our life nowadays. From sharing almost every type of file to anyone/anywhere around the world has reduced our cost and time tremendously from self-hosting an FTP server and taking care of its security.
From DevOps perspective, it becomes even more convenient if we could have our google drive(s) synced on our server(s) as its saves the time for downloading the files and uploading it to the server.
For mounting the google drive, there is a package named: “google-drive-ocamlfuse” available in Linux that does this task for us.
To install this package on Ubuntu follow the steps:
sudo add-apt-repository ppa:alessandro-strada/ppa sudo apt-get update sudo apt-get install google-drive-ocamlfuse
To authorize the google drive to the local machine, use:
mkdir <mount_point> google-drive-ocamlfuse <mount_point>
This will open the default browser of your machine, ask for your Google credentials, then Authorization request and finally allow it to access your drive.
For mounting google drive on a Linux Server:
mkdir <mount_point> google-drive-ocamlfuse -headless <mount_point>
Instead of opening and asking for authorization in the browser, it will give you a URL for authorization, which you can open in any browser, provide authorization and copy the verification code.
To unmount the google drive:
fusermount -u <mount_point>
Hope after following the blog and implementing this in your project your client will be happy with your work