• Stars
    star
    262
  • Rank 156,136 (Top 4 %)
  • Language
    Ruby
  • License
    MIT License
  • Created about 11 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tool belt for managing your S3 buckets

S3Sync

Intro

I needed to backup some stuff once when I was in the woods. Unfortunately, I didn't find anything easy but elegant enough to sync my stuff with Amazon S3.

S3Sync uses the official aws sdk for ruby so we expect it to be stable. The most sensitive parts of the code are tested and that only tends to get better, I'm crazy about testing code! :)

Code maturity

This project started as a fork of the original s3sync command that had its last release in 2008. After a while it became a complete rewrite which might be considered good in a lot of cases, however, it also entails losing the maturity that the old code used to have.

To overcome this problem, I invested time writing tests for some of the most hairy part of the code: the sync command.

That being said, I believe there must be a couple stupid bugs around and I highly appreciate reports and patches (specially if they come with tests).

Installation

$ gem install s3sync

Usage

S3Sync's help command is pretty powerful, so you can get all the help you need from him. He's always ready to answer your questions:

$ s3sync help [SUBCOMMAND]

If you want to learn more about a specific command, you just need to inform the optional [SUBCOMMAND] argument:

$ s3sync help sync

Managing buckets

The following commands are used to manage buckets themselves

  • s3sync listbuckets: Show all available buckets
  • s3sync createbucket <name>: Create a new bucket
  • s3sync deletebucket <name> [-f]: Delete a bucket

Managing content

  • delete <bucket>:<key>: Delete a key from a bucket
  • list <bucket>[:prefix] [-m] [-d]: List items filed under a given bucket
  • put <bucket>[:<key>] <file>: Upload a file to a bucket under a certain prefix
  • get <bucket>:<key> <file>: Retrieve an object and save to the specified file
  • url <bucket>:<key>: Generates public urls or authenticated endpoints for the object

The sync command

If you want to sync up an s3 folder with a local folder (both directions are accepted), you can use the sync command. e.g.:

$ s3sync sync Work/reports disc.company.com:reports/2013/08

The above line will sync the local folder Work/reports with the remote node disc.company.com:reports/2013/08.

The most important options of this command are:

  • --exclude=EXPR: Skip copying files that matches this pattern. (Accept Ruby REs)
  • --keep: Keep files in the destination even if they don't exist in the source
  • --dry-run: Do not download or exclude anything, just prints out what was planned

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Feedback

Reporting bugs and giving any other feedback is highly appreciated. Feel free to create a new issue if you find anything wrong or if you have any ideas to improve the ranger!

instanc.es Badge Bitdeli Badge

More Repositories

1

forbiddenfruit

Patch built-in python objects
Python
819
star
2

curdling

Concurrent package manager for Python
Python
276
star
3

hackernews.el

Hacker News client for Emacs
Emacs Lisp
247
star
4

muttrc

Everything I need to run mutt as a decent mail client
38
star
5

eosd

Emacs Notification Daemon
Emacs Lisp
27
star
6

effigy

Small language that compiles to Python37 bytecode
JavaScript
14
star
7

dotfiles

My dotfiles
Shell
7
star
8

pnad

Extraindo informações da PNAD2013
Python
5
star
9

emailverifier

Verify if email addresses exist with SMTP
Python
5
star
10

emacs.d

My Emacs configuration
Emacs Lisp
5
star
11

xmpp-shell

A very simple xmpp shell based on libstrophe
C
4
star
12

bubblesgame

Small Game made with Lua and Love
Lua
4
star
13

langlang

Language Toolkit
Rust
4
star
14

nestk

Nintendo Entertainment System and Java Script shaken in the same bowl
JavaScript
3
star
15

fate

Keep track of what the gods have whispered you to do while you're on your computer
Python
3
star
16

emacs-search-kit

Emacs Search Kit
Emacs Lisp
2
star
17

bitu

A simple, generic and extensible multi-protocol bot writen in C
C
2
star
18

duende

Python
2
star
19

estudos

Campinho de futebol atrás do corrégo pra treinar os fundamentos da computacão
Python
2
star
20

ratpoison

Non official ratpoison clone
C
2
star
21

dojo

learn systems fundamentals with tests
TypeScript
2
star
22

taningia

A generic C library with a lot of cool features, including an xmpp client
C
2
star
23

ucam

Watch your stuff
Rust
1
star
24

clarete.github.io

My website
HTML
1
star
25

todoable

Ruby Wrapper for the Todoable API by Teachable
Ruby
1
star
26

psbrowser

A generic xmpp pubsub browser
Vala
1
star
27

chezzy

Chess Game
HTML
1
star
28

minimal-react-structure

The bare minimum react setup
JavaScript
1
star
29

atomjs

implementation of the atom standard in javascript (RFC 4287)
JavaScript
1
star
30

clarete-dev.github.io

source code of clarete.dev website
HTML
1
star
31

lua-couchdb

CouchDB bindings for Lua
Lua
1
star
32

milieu

A helping hand to manage settings for multiple environments
Python
1
star
33

ratcursor

A small ratpoison helper to select frames with the rat
C
1
star