Monday, July 16, 2012

Mini How-to : Google Drive under Linux: Synchronize your Google Drive under Linux with grive ! (waiting for the official Google client ^^)



Edit 10/18/2012:
Take a look at new project https://www.insynchq.com/, it's very easy to install and use, offers much more integration in Linux desktop than grive.

Very great !!!



Official Linux Google drive version is still lacking... if you are as i am addicted to various Google Services this lack is very frustrating ! (what does Google waits for ???)

Fortunately, you can now, thanks to "grive" and its author, synchronize your local documents to your Google Drive in command line :-)

Here's how in a few command lines:

Install grive:

Install grive (under Ubuntu and derived distributions)

sudo add-apt-repository ppa:nilarimogard/webupd8

sudo apt-get update

sudo apt-get install grive

Configure first launch to authorize grive to access to your Google Drive:

Go to the directory you to be synchronize with Google Drive and configure grive

$ cd <My Local Directory to synchronize>
$ grive
-----------------------                                                                                                                     
Please go to this URL and get an authentication code:                                                                                       
                                                                                                                                            
https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2F
auth%2Fuserinfo.profile+https%3A%2F%2Fdocs.google.com%2Ffeeds%2F+https%3A%2F%2Fdocs.googleusercontent.com%2F+https%3A%2F%2Fspreadsheets.goog
le.com%2Ffeeds%2F&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=22314510474.apps.googleusercontent.com                
                                                                                                                                            
-----------------------                                                                                                                     
Please input the authentication code here:   


Open your Web browser, paste this URL and login with your Google account when asked and finally copy the code that Google will provide to paste into the terminal

grive will execute the first synchronization:

Reading local directories
Synchronizing folders
Reading remote server file list
Detecting changes from last sync
Synchronizing files
Finished!  


You're done, now every time you want to synchronize your local data with your Google Drive, just enter a terminal, "cd" to your directory and enter "grive" command line.

It is not necessary anymore to run it with "-a" option as its purpose was to configure and associate your computer with your Google drive account, just run grive with no option to initiate synchronization.

You may also want to see others options such as "-v" to enable more verbose mode or "--dry-run" to simulate execution, just see help:

grive --help                                                                                                         
Grive options:                                                                                                                              
  -h [ --help ]         Produce help message                                                                                                
  -v [ --version ]      Display Grive version                                                                                               
  -a [ --auth ]         Request authorization token                                                                                         
  -V [ --verbose ]      Verbose mode. Enable more messages than normal.                                                                     
  -d [ --debug ]        Enable debug level messages. Implies -v.                                                                            
  -l [ --log ] arg      Set log output filename.                                                                                            
  -f [ --force ]        Force grive to always download a file from Google Drive                                                             
                        instead of uploading it.                                                                                            
  --dry-run             Only detect which files need to be uploaded/downloaded,                                                             
                        without actually performing them.  



Really great work from the author (see man):

AUTHOR                                                                                                                                      
       The software was developed by Nestal Wan.                                                                                            
                                                                                                                                            
       This manpage was written by Jose Luis Segura Lucas (josel.segura@gmx.es)   


  
Now we (all Linux Google services users) are still waiting from Google to finally provide us their official client... Google listen to us, it would be nice not to forgive Linux users :-)












3 comments:

  1. Google Drive tool stands paramount in my profession and it has played the most vital role in storage my comprehensive research work, bulk voluminous body of work because as expert who provides buy dissertation services in UK, we have to research rich array of intricate research papers to support research project completion garnered with sizeable information insights, hence drive application is the this cutting-edge technology really provides an excellent and excessive storage option for academic completion and rapid access coupled with integrated security feature of data and portfolio.

    ReplyDelete
  2. Great guide on syncing Google Drive with Linux! While you're getting things organized, if you're also looking to set up an online store, check out AR Dropshipping for some affordable dropshipping products in Pakistan. They have a fantastic selection that can really boost your business without breaking the bank!

    ReplyDelete

Please feel free to comment ^^