Synchronize GNULinux and Google Drive? It’s possible, yes…
I want to sync my Google Drive account on my GNULinux. (I’m running elementary OS, which was built on top of Ubuntu)
Following the instructions in webupd8′s site…
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:
(for example: “mkdir ~/Gdrive” to create a folder called GDrive in your home folder)
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…
…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:
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.
Posted on January 9, 2013, in cloudstorage, elementaryOS, English, OS, Ubuntu and tagged backup, bash, command line, cron table, elementary, elementaryOS, gdrive, gnu, gnulinux, google, google drive, grive, linux, sh, shell script, software, sync, synchronization, ubuntu. Bookmark the permalink. 4 Comments.