Linux – Using google drive to dynamically expand VPS storage

google-drivelinuxscpvps

I was wondering if anyone ever tried using the free online storage services such as Mega, Google Drive or Dropbox to dynamically increase the "small" storage provided with cheap VPS services.

What I mean by "dynamically" is that whenever I upload something on my server (via SCP for example) it would transfer the file to, let's say, Google Drive, then delete the file from the server and whenever the server needs the file, it would temporarily download it from GDrive (which is fast considering data-centers bandwidth)

Basically giving a path to a Google Drive folder on linux without downloading the folder. Kinda like showing a Google Drive folder as a network storage/NAS
I think this might have been done before but I didn't find a thread about it.

Thanks in advance

Best Answer

Basically giving a path to a Google Drive folder on linux without downloading the folder.

This kind of functionality has a name: mounting. Mounting a filesystem means making it accessible at a certain point in the Linux directory tree. It is possible to Mount Google Drive in Linux with OCamlfuse.

  1. Install OCamlfuse.

  2. Allow and give permission to application gdfuse OAuth2 to access your Google account. Start the process with command:

    google-drive-ocamlfuse 
    
  3. Create a directory and mount Google Drive, e.g.

    mkdir ~/google-drive 
    google-drive-ocamlfuse ~/google-drive
    
Related Topic