Skip to main content

GSync - RSync for Google Drive

Project description

GSync 0.1.0
29 March 2013

Copyright (C) 2013 Craig Phillips. All rights reserved.

Google currently don't produce a Linux variant of their client for Google-Drive.
This is my implementation of a multiplatform, command line tool that for the
most part, is intended to behave much like rsync. I aim to follow the same
functional implementation of rsync and also provide the same features, enabled
or disabled through a similar interface of command line options.

There was a close contender for being a suitable client called grive. This is
ideal if you only intend to sync a small library of files or if the files being
synchronised are small in size. I found the client to be unreliable in other
cases, crashing and failing to synchronise very little. I looked over much of
the code and found that it favours preloading with a hash of the directory to
be synchronised and all sub directories, before it even synchronises any files.
This creates a scenario where synchronisation will never take place if the
preloading fails. Instead, I will opt to process directories depth first and
sequentially in order to allow synchronisation to occur immediately.

The only prerequisite is that you have python. The makefile will take care of
installing any required python libraries using pip, which will also be obtained.


If you like the software, don't forget to donate to further development of it!

My Blog:


The GSync package is now available on Installing using pypi-install will mean that dependencies will be automatically resolved, alleviating the need to resolve dependencies and download packages yourself. On debian, install the python-stdeb package:

$ sudo apt-get install python-stdeb

Once the python-stdeb package is installed, you will be able to install GSync as follows:

$ sudo pypi-install gsync

That's it. GSync will be installed along with any required packages.

RSync options implemented so far:

-v, --verbose enable verbose output
--debug enable debug output
-q, --quiet suppress non-error messages
-r, --recursive recurse into directories
-R, --relative use relative path names
-u, --update skip files that are newer on the receiver
-d, --dirs transfer directories without recursing
-g, --group preserve group
-o, --owner preserve owner (super-user only)
-p, --perms preserve permissions
-i, --itemize-changes output a change-summary for all updates
--progress show progress during transfer


* Traversal of the Google drive is now more reliable and requires less CPU
and network requests.

* Intermediate directory creation now occurs through a restructure of the
directory walking code, ensuring directories are provided to the callback.

* Itemized output now occurs without needing to specify the verbose option.

* Interrupt handling now works, so Ctrl-C will halt the sync and output the
progress (bytes sent/received) up to the interrupt.

* Implemented --progress functionality so that upload progress can be

* Fixed Bug: "Syncs one file and crashes with division by zero error"

* Fixed Bug: "Always: Error: String or Integer object expected for key,
unicode found"

* Fixed Bug: "BUG: Files get updated that are in Trash and do not get

To do:

* Better handling of resumable uploads (--append).

* Improved file attribute handling using Google Drive file attributes data.


* Append mode doesn't work, this is not supported by Google Drive. May be able
to work around it by caching the resumable upload ID somewhere locally when
a file is being synchronised.

* Some features still not implemented.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gsync, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size gsync-0.1.0.tar.gz (18.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page