Synchronize GNULinux and Google Drive? It’s possible, yes…

Sources: http://www.webupd8.org/2012/05/grive-open-source-google-drive-client.html and http://www.howtogeek.com/130380/how-to-use-google-drive-on-linux-2-unofficial-solutions/

What?

I want to sync my Google Drive account on my GNULinux. (I’m running elementary OS, which was built on top of Ubuntu)

How?

Following the instructions in webupd8′s site…

Install:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install grive

(for distros other than Ubuntu derivatives, get the code at https://github.com/Grive)

Create your synch folder:

mkdir SynchedFolderName

(for example: “mkdir ~/Gdrive” to create a folder called GDrive in your home folder)

Config Grive:

cd SynchedFolderName
grive -a

It will give you an URL and wait for a authentication code. Paste the URL to your web browser and allow access of Grive to Google Drive.

Here you will obtain a code… copy it and paste to your grive command line. Press enter and grive will start sync. (Be patient)

Now you need to run Grive each time you want to synch… so the best solution is to create a cron task.

Create a new file…

nano gdrivesynch.sh

…and paste this content to it:

#!/bin/sh
 if ps ax | grep -v grep | grep grive > /dev/null
 then
    echo "grive already running, skipping sync."
 else
    ping -c 5 drive.google.com >> /dev/null
    if [ $? -eq 0 ]; then
       cd /FullPathToYour/SynchedFolderName
       grive
    fi
    exit 0
 fi

Give execution permissions to the script.

Now set cron to run the created script:

crontab -e

It will open the cron table to edit. To run the script every 15 minutes paste this line at the bottom:

 */15 * * * * /PathTo/gdrivesynch.sh

I hope you enjoy this app! May the Force be with you.

NOTE: not all the file types are synched by grive!!! See the sources.

About these ads

Posted on January 9, 2013, in cloudstorage, elementaryOS, English, OS, Ubuntu and tagged , , , , , , , , , , , , , , , , , , . Bookmark the permalink. 4 Comments.

  1. I am really impressed with your writing skills and also with the layout on your blog. Is this a paid theme or did you modify it yourself? Either way keep up the excellent quality writing, it is rare to see a great blog like this one these days..

  2. can’t put my finger where i heard this before but its still interesting

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 598 other followers

%d bloggers like this: