I’ve been using Google Docs for a few months and I love it. I can access everything from everywhere. No worrying about something being on a box that I can’t get to for some unknown reason.

Whats even better is that Google has released GoogleCL, a command line utility for linux that lets you interact with many of google’s services, especially google docs.

So I figured, I’m a paranoid kid who would do RAID 1+1 if he had the money. So why not backup my google docs every once in a while? Trust no one.

__________How to…

  1. Download the gdata-python-client, extract it, and install it (cd into the untar’ed dir and read the readme)
    1. Download the GoogleCL tools and read the readme (its the same command as for gdata)
    2. type “google -help” for options or go here for documentation on how to interact with it.

Now lets say you want to backup every single google document you have.  Messing around with the google command, I was able to figure out a way to do this:

$ google docs get –folder * –dest=/home/user/Desktop/googledocsbackup

The first time you do this, you will be asked for your username, a broswer window will pop up and ask you to login, and you basically allow your computer to get into your google account by giving googleCL the allow code google generates for you.
I just made it sound more complicated that it really is but seriously just read and you will be fine.

After you complete that, its automatic from here on out.  Meaning bash scripts here I come!!

Mario Loria is a builder of diverse infrastructure with modern workloads on both bare-metal and cloud platforms. He's traversed roles in system administration, network engineering, and DevOps. You can learn more about him here.