sftpsync

command module
v0.0.0-...-9b8e8eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2018 License: BSD-3-Clause Imports: 26 Imported by: 0

README

sftpsync: Synchronize SFTP to Cloud Storage

Synchonizes an SFTP directory to a cloud storage bucket (S3 or Google Cloud Storage). This is mostly an experiment to try Google's portable cloud library, but it might be useful to someone! If you need to work with FTP/SFTP and cloud storage, there are services you can use instead, such as Conduit FTP, which provides an FTP/SFTP interface to cloud storage. See my blog post for more details.

Usage

Assuming you have Go installed and your paths set up correctly:

  1. go get github.com/evanj/sftpsync
  2. sftpsync sftp://example.com/directory s3://bucket/path

Authentication

SSH/SFTP

sftpsync uses SSH agent if you have it configured. If that fails, it will use your current user name and prompt for a password. Otherwise, you can specify a username and password in the URL as sftp://user:pass@host/.

AWS S3

You must set the AWS_REGION, AWS_ACCESS_KEY_ID, and AWS_SECRET_ACCESS_KEY environment variables, as specified in Amazon's documentation.

Google Cloud Storage

This uses Google Cloud's "application default credentials". It will either use your gcloud account, the Compute Engine service account, or the key pointed to be the GOOGLE_APPLICATION_CREDENTIALS environment variable.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL