gdsync - rsync like file sync tool

Build Status Coverage Status


git clone
cd gdsync
bundle install


The first time you upload to/download from Google Drive, gdsync will prompt authentication message like this:

1. Open this page:

2. Enter the authorization code shown in the page:

You have to open the web page and follow the instruction by Google. Then paste authentication code. The autentication code will be stored to config.json under the project root directory.


gdsync has a subset of rsync(1) options. Supported rsync options are:

 -v, --verbose                    increase verbosity
 -c, --checksum                   skip based on checksum, not mod-time & size
 -a, --archive                    archive mode; same as -rt
 -r, --recursive                  recurse into directories
 -u, --update                     skip files that are newer on the receiver
 -d, --dirs                       transfer directories without recursing
 -t, --times                      preserve time
 -n, --dry-run                    show what would have been transferred
     --existing                   skip creating new files on receiver
     --ignore-existing            skip updating files that exist on receiver
     --remove-source-files        sender removes synchronized files (non-dir)
     --delete                     delete extraneous files from dest dirs
     --max-size=SIZE              don't transfer any file larger than SIZE
     --min-size=SIZE              don't transfer any file smaller than SIZE
 -I, --ignore-times               don't skip files that match size and time
     --size-only                  skip files that match in size

Local to Google Drive sync

ruby gdsync.rb --archive /path/to/source/dir/ googledrive://path/to/destination/dir

Google Drive to Local sync

ruby gdsync.rb --archive googledrive://path/to/source/dir/ /path/to/destination/dir

Google Drive to Google Drive sync

ruby gdsync.rb --archive googledrive://path/to/soruce/dir/ googledrive://path/to/destination/dir

Local to Local sync

It is possible to sync between local directories with gdsync, but rsync is better choice in this case.


The MIT License




gdsync comes with ABSOLUTELY NO WARRANTY.