Skip to content

LeviticusMB/Stream2GDrive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stream2GDrive

Stream2GDrive is a simple tool that can be used to upload, download and list files on Google Drive. It's main advantage compared to similar tools is that it supports streaming from standard input and output – perfect for transferring backups to and from the cloud.

It's also portable across multiple operating systems and its only dependency is Java.

Quickstart

Download the latest release. Mac users can simply install using homebrew:

brew install leviticusmb/mac/stream2gdrive

Backup /opt to Google Drive, encrypted:

tar cfvz - /opt | gpg -e -r you@example.com | stream2gdrive put - --output opt-2014-04-24.tar.gz

List destination folder:

stream2gdrive list

Download it:

stream2gdrive get opt-2014-04-24.tar.gz

Verify checksums:

stream2gdrive md5 | md5sum -c

Usage

There are five commands available:

  • get
  • list
  • md5
  • put
  • trash

The first time you start the program, it will ask for permission to access your account. Normally, this will open a browser window and the access token will be automatically retrieved using an embedded web server.

If you're not running the command on the local computer, you can use the --oob option to enter the authentication code manually instead.

get

stream2gdrive get <name>
    [--output <local-name or '-' for stdout>]
    [--parent <remote-folder>]
    [--verbose]

Retrieve a file from your Google Drive. Specify --output to override the local file name. Use --parent to download a file that is not in the Google Drive root folder.

--verbose enables progress reporting.

list

stream2gdrive list
    [--parent <remote-folder>]

Lists files and metadata in Google Drive's root folder, or a folder specified by --parent.

md5

stream2gdrive md5
    [--parent <remote-folder>]

Lists files and their MD5 checksum in Google Drive's root folder, or a folder specified by --parent.

The output is compatible with the popular md5sum program and can be piped directly to md5sum -c to quickly verify that the local and remote files are the same.

put

stream2gdrive put <local-name or '-' for stdin>
    [--output <remote-name>]
    [--parent <remote-folder>]
    [--mime <mime-type>]
    [--verbose]

Send a file to your Google Drive's root folder (unless --parent is specified). Optionally specify a new remote file name with --output and use --mime to override the MIME type.

--verbose enables progress reporting.

trash

stream2gdrive trash <name>
    [--parent <remote-folder>]

Move a file in your Google Drive's root folder (unless --parent is specified) to the trash.

Author & License

Stream2GDrive was written by Martin Blom martin@blom.org and is licensed under the Apache 2.0 license.

About

Transfer files to and from Google Drive.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages