s3_cmd_bin 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +17 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +28 -0
- data/Rakefile +1 -0
- data/lib/s3_cmd_bin/version.rb +3 -0
- data/lib/s3_cmd_bin.rb +15 -0
- data/resources/ChangeLog +1462 -0
- data/resources/INSTALL +97 -0
- data/resources/LICENSE +339 -0
- data/resources/MANIFEST.in +2 -0
- data/resources/Makefile +4 -0
- data/resources/NEWS +234 -0
- data/resources/README +342 -0
- data/resources/S3/ACL.py +224 -0
- data/resources/S3/ACL.pyc +0 -0
- data/resources/S3/AccessLog.py +92 -0
- data/resources/S3/AccessLog.pyc +0 -0
- data/resources/S3/BidirMap.py +42 -0
- data/resources/S3/BidirMap.pyc +0 -0
- data/resources/S3/CloudFront.py +773 -0
- data/resources/S3/CloudFront.pyc +0 -0
- data/resources/S3/Config.py +294 -0
- data/resources/S3/Config.pyc +0 -0
- data/resources/S3/ConnMan.py +71 -0
- data/resources/S3/ConnMan.pyc +0 -0
- data/resources/S3/Exceptions.py +88 -0
- data/resources/S3/Exceptions.pyc +0 -0
- data/resources/S3/FileDict.py +53 -0
- data/resources/S3/FileDict.pyc +0 -0
- data/resources/S3/FileLists.py +517 -0
- data/resources/S3/FileLists.pyc +0 -0
- data/resources/S3/HashCache.py +53 -0
- data/resources/S3/HashCache.pyc +0 -0
- data/resources/S3/MultiPart.py +137 -0
- data/resources/S3/MultiPart.pyc +0 -0
- data/resources/S3/PkgInfo.py +14 -0
- data/resources/S3/PkgInfo.pyc +0 -0
- data/resources/S3/Progress.py +173 -0
- data/resources/S3/Progress.pyc +0 -0
- data/resources/S3/S3.py +979 -0
- data/resources/S3/S3.pyc +0 -0
- data/resources/S3/S3Uri.py +223 -0
- data/resources/S3/S3Uri.pyc +0 -0
- data/resources/S3/SimpleDB.py +178 -0
- data/resources/S3/SortedDict.py +66 -0
- data/resources/S3/SortedDict.pyc +0 -0
- data/resources/S3/Utils.py +462 -0
- data/resources/S3/Utils.pyc +0 -0
- data/resources/S3/__init__.py +0 -0
- data/resources/S3/__init__.pyc +0 -0
- data/resources/TODO +52 -0
- data/resources/artwork/AtomicClockRadio.ttf +0 -0
- data/resources/artwork/TypeRa.ttf +0 -0
- data/resources/artwork/site-top-full-size.xcf +0 -0
- data/resources/artwork/site-top-label-download.png +0 -0
- data/resources/artwork/site-top-label-s3cmd.png +0 -0
- data/resources/artwork/site-top-label-s3sync.png +0 -0
- data/resources/artwork/site-top-s3tools-logo.png +0 -0
- data/resources/artwork/site-top.jpg +0 -0
- data/resources/artwork/site-top.png +0 -0
- data/resources/artwork/site-top.xcf +0 -0
- data/resources/format-manpage.pl +196 -0
- data/resources/magic +63 -0
- data/resources/run-tests.py +537 -0
- data/resources/s3cmd +2116 -0
- data/resources/s3cmd.1 +435 -0
- data/resources/s3db +55 -0
- data/resources/setup.cfg +2 -0
- data/resources/setup.py +80 -0
- data/resources/testsuite.tar.gz +0 -0
- data/resources/upload-to-sf.sh +7 -0
- data/s3_cmd_bin.gemspec +23 -0
- metadata +152 -0
@@ -0,0 +1,196 @@
|
|
1
|
+
#!/usr/bin/perl
|
2
|
+
|
3
|
+
# Format s3cmd.1 manpage
|
4
|
+
# Usage:
|
5
|
+
# s3cmd --help | format-manpage.pl > s3cmd.1
|
6
|
+
|
7
|
+
use strict;
|
8
|
+
|
9
|
+
my $commands = "";
|
10
|
+
my $cfcommands = "";
|
11
|
+
my $wscommands = "";
|
12
|
+
my $options = "";
|
13
|
+
|
14
|
+
while (<>) {
|
15
|
+
if (/^Commands:/) {
|
16
|
+
while (<>) {
|
17
|
+
last if (/^\s*$/);
|
18
|
+
my ($desc, $cmd, $cmdline);
|
19
|
+
($desc = $_) =~ s/^\s*(.*?)\s*$/$1/;
|
20
|
+
($cmdline = <>) =~ s/^\s*s3cmd (.*?) (.*?)\s*$/s3cmd \\fB$1\\fR \\fI$2\\fR/;
|
21
|
+
$cmd = $1;
|
22
|
+
if ($cmd =~ /^cf/) {
|
23
|
+
$cfcommands .= ".TP\n$cmdline\n$desc\n";
|
24
|
+
} elsif ($cmd =~ /^ws/) {
|
25
|
+
$wscommands .= ".TP\n$cmdline\n$desc\n";
|
26
|
+
} else {
|
27
|
+
$commands .= ".TP\n$cmdline\n$desc\n";
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
31
|
+
if (/^Options:/) {
|
32
|
+
my ($opt, $desc);
|
33
|
+
while (<>) {
|
34
|
+
last if (/^\s*$/);
|
35
|
+
$_ =~ s/(.*?)\s*$/$1/;
|
36
|
+
$desc = "";
|
37
|
+
$opt = "";
|
38
|
+
if (/^ (-.*)/) {
|
39
|
+
$opt = $1;
|
40
|
+
if ($opt =~ / /) {
|
41
|
+
($opt, $desc) = split(/\s\s+/, $opt, 2);
|
42
|
+
}
|
43
|
+
$opt =~ s/(-[^ ,=\.]+)/\\fB$1\\fR/g;
|
44
|
+
$opt =~ s/-/\\-/g;
|
45
|
+
$options .= ".TP\n$opt\n";
|
46
|
+
} else {
|
47
|
+
$_ =~ s/\s*(.*?)\s*$/$1/;
|
48
|
+
$_ =~ s/(--[^ ,=\.]+)/\\fB$1\\fR/g;
|
49
|
+
$desc .= $_;
|
50
|
+
}
|
51
|
+
if ($desc) {
|
52
|
+
$options .= "$desc\n";
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
print "
|
58
|
+
.TH s3cmd 1
|
59
|
+
.SH NAME
|
60
|
+
s3cmd \\- tool for managing Amazon S3 storage space and Amazon CloudFront content delivery network
|
61
|
+
.SH SYNOPSIS
|
62
|
+
.B s3cmd
|
63
|
+
[\\fIOPTIONS\\fR] \\fICOMMAND\\fR [\\fIPARAMETERS\\fR]
|
64
|
+
.SH DESCRIPTION
|
65
|
+
.PP
|
66
|
+
.B s3cmd
|
67
|
+
is a command line client for copying files to/from
|
68
|
+
Amazon S3 (Simple Storage Service) and performing other
|
69
|
+
related tasks, for instance creating and removing buckets,
|
70
|
+
listing objects, etc.
|
71
|
+
|
72
|
+
.SH COMMANDS
|
73
|
+
.PP
|
74
|
+
.B s3cmd
|
75
|
+
can do several \\fIactions\\fR specified by the following \\fIcommands\\fR.
|
76
|
+
$commands
|
77
|
+
|
78
|
+
.PP
|
79
|
+
Commands for static WebSites configuration
|
80
|
+
$wscommands
|
81
|
+
|
82
|
+
.PP
|
83
|
+
Commands for CloudFront management
|
84
|
+
$cfcommands
|
85
|
+
|
86
|
+
.SH OPTIONS
|
87
|
+
.PP
|
88
|
+
Some of the below specified options can have their default
|
89
|
+
values set in
|
90
|
+
.B s3cmd
|
91
|
+
config file (by default \$HOME/.s3cmd). As it's a simple text file
|
92
|
+
feel free to open it with your favorite text editor and do any
|
93
|
+
changes you like.
|
94
|
+
$options
|
95
|
+
|
96
|
+
.SH EXAMPLES
|
97
|
+
One of the most powerful commands of \\fIs3cmd\\fR is \\fBs3cmd sync\\fR used for
|
98
|
+
synchronising complete directory trees to or from remote S3 storage. To some extent
|
99
|
+
\\fBs3cmd put\\fR and \\fBs3cmd get\\fR share a similar behaviour with \\fBsync\\fR.
|
100
|
+
.PP
|
101
|
+
Basic usage common in backup scenarios is as simple as:
|
102
|
+
.nf
|
103
|
+
s3cmd sync /local/path/ s3://test-bucket/backup/
|
104
|
+
.fi
|
105
|
+
.PP
|
106
|
+
This command will find all files under /local/path directory and copy them
|
107
|
+
to corresponding paths under s3://test-bucket/backup on the remote side.
|
108
|
+
For example:
|
109
|
+
.nf
|
110
|
+
/local/path/\\fBfile1.ext\\fR \\-> s3://bucket/backup/\\fBfile1.ext\\fR
|
111
|
+
/local/path/\\fBdir123/file2.bin\\fR \\-> s3://bucket/backup/\\fBdir123/file2.bin\\fR
|
112
|
+
.fi
|
113
|
+
.PP
|
114
|
+
However if the local path doesn't end with a slash the last directory's name
|
115
|
+
is used on the remote side as well. Compare these with the previous example:
|
116
|
+
.nf
|
117
|
+
s3cmd sync /local/path s3://test-bucket/backup/
|
118
|
+
.fi
|
119
|
+
will sync:
|
120
|
+
.nf
|
121
|
+
/local/\\fBpath/file1.ext\\fR \\-> s3://bucket/backup/\\fBpath/file1.ext\\fR
|
122
|
+
/local/\\fBpath/dir123/file2.bin\\fR \\-> s3://bucket/backup/\\fBpath/dir123/file2.bin\\fR
|
123
|
+
.fi
|
124
|
+
.PP
|
125
|
+
To retrieve the files back from S3 use inverted syntax:
|
126
|
+
.nf
|
127
|
+
s3cmd sync s3://test-bucket/backup/ /tmp/restore/
|
128
|
+
.fi
|
129
|
+
that will download files:
|
130
|
+
.nf
|
131
|
+
s3://bucket/backup/\\fBfile1.ext\\fR \\-> /tmp/restore/\\fBfile1.ext\\fR
|
132
|
+
s3://bucket/backup/\\fBdir123/file2.bin\\fR \\-> /tmp/restore/\\fBdir123/file2.bin\\fR
|
133
|
+
.fi
|
134
|
+
.PP
|
135
|
+
Without the trailing slash on source the behaviour is similar to
|
136
|
+
what has been demonstrated with upload:
|
137
|
+
.nf
|
138
|
+
s3cmd sync s3://test-bucket/backup /tmp/restore/
|
139
|
+
.fi
|
140
|
+
will download the files as:
|
141
|
+
.nf
|
142
|
+
s3://bucket/\\fBbackup/file1.ext\\fR \\-> /tmp/restore/\\fBbackup/file1.ext\\fR
|
143
|
+
s3://bucket/\\fBbackup/dir123/file2.bin\\fR \\-> /tmp/restore/\\fBbackup/dir123/file2.bin\\fR
|
144
|
+
.fi
|
145
|
+
.PP
|
146
|
+
All source file names, the bold ones above, are matched against \\fBexclude\\fR
|
147
|
+
rules and those that match are then re\\-checked against \\fBinclude\\fR rules to see
|
148
|
+
whether they should be excluded or kept in the source list.
|
149
|
+
.PP
|
150
|
+
For the purpose of \\fB\\-\\-exclude\\fR and \\fB\\-\\-include\\fR matching only the
|
151
|
+
bold file names above are used. For instance only \\fBpath/file1.ext\\fR is tested
|
152
|
+
against the patterns, not \\fI/local/\\fBpath/file1.ext\\fR
|
153
|
+
.PP
|
154
|
+
Both \\fB\\-\\-exclude\\fR and \\fB\\-\\-include\\fR work with shell-style wildcards (a.k.a. GLOB).
|
155
|
+
For a greater flexibility s3cmd provides Regular-expression versions of the two exclude options
|
156
|
+
named \\fB\\-\\-rexclude\\fR and \\fB\\-\\-rinclude\\fR.
|
157
|
+
The options with ...\\fB\\-from\\fR suffix (eg \\-\\-rinclude\\-from) expect a filename as
|
158
|
+
an argument. Each line of such a file is treated as one pattern.
|
159
|
+
.PP
|
160
|
+
There is only one set of patterns built from all \\fB\\-\\-(r)exclude(\\-from)\\fR options
|
161
|
+
and similarly for include variant. Any file excluded with eg \\-\\-exclude can
|
162
|
+
be put back with a pattern found in \\-\\-rinclude\\-from list.
|
163
|
+
.PP
|
164
|
+
Run s3cmd with \\fB\\-\\-dry\\-run\\fR to verify that your rules work as expected.
|
165
|
+
Use together with \\fB\\-\\-debug\\fR get detailed information
|
166
|
+
about matching file names against exclude and include rules.
|
167
|
+
.PP
|
168
|
+
For example to exclude all files with \".jpg\" extension except those beginning with a number use:
|
169
|
+
.PP
|
170
|
+
\\-\\-exclude '*.jpg' \\-\\-rinclude '[0-9].*\\.jpg'
|
171
|
+
.SH SEE ALSO
|
172
|
+
For the most up to date list of options run
|
173
|
+
.B s3cmd \\-\\-help
|
174
|
+
.br
|
175
|
+
For more info about usage, examples and other related info visit project homepage at
|
176
|
+
.br
|
177
|
+
.B http://s3tools.org
|
178
|
+
.SH DONATIONS
|
179
|
+
Please consider a donation if you have found s3cmd useful:
|
180
|
+
.br
|
181
|
+
.B http://s3tools.org/donate
|
182
|
+
.SH AUTHOR
|
183
|
+
Written by Michal Ludvig <mludvig\@logix.net.nz> and 15+ contributors
|
184
|
+
.SH CONTACT, SUPPORT
|
185
|
+
Prefered way to get support is our mailing list:
|
186
|
+
.I s3tools\\-general\@lists.sourceforge.net
|
187
|
+
.SH REPORTING BUGS
|
188
|
+
Report bugs to
|
189
|
+
.I s3tools\\-bugs\@lists.sourceforge.net
|
190
|
+
.SH COPYRIGHT
|
191
|
+
Copyright \\(co 2007,2008,2009,2010,2011,2012 Michal Ludvig <http://www.logix.cz/michal>
|
192
|
+
.br
|
193
|
+
This is free software. You may redistribute copies of it under the terms of
|
194
|
+
the GNU General Public License version 2 <http://www.gnu.org/licenses/gpl.html>.
|
195
|
+
There is NO WARRANTY, to the extent permitted by law.
|
196
|
+
";
|
data/resources/magic
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
# Additional magic for common web file types
|
2
|
+
|
3
|
+
0 string/b {\ " JSON data
|
4
|
+
!:mime application/json
|
5
|
+
0 string/b {\ } JSON data
|
6
|
+
!:mime application/json
|
7
|
+
0 string/b [ JSON data
|
8
|
+
!:mime application/json
|
9
|
+
|
10
|
+
0 search/4000 function
|
11
|
+
>&0 search/32/b )\ { JavaScript program
|
12
|
+
!:mime application/javascript
|
13
|
+
|
14
|
+
0 search/4000 @media CSS stylesheet
|
15
|
+
!:mime text/css
|
16
|
+
0 search/4000 @import CSS stylesheet
|
17
|
+
!:mime text/css
|
18
|
+
0 search/4000 @namespace CSS stylesheet
|
19
|
+
!:mime text/css
|
20
|
+
0 search/4000/b {\ background CSS stylesheet
|
21
|
+
!:mime text/css
|
22
|
+
0 search/4000/b {\ border CSS stylesheet
|
23
|
+
!:mime text/css
|
24
|
+
0 search/4000/b {\ bottom CSS stylesheet
|
25
|
+
!:mime text/css
|
26
|
+
0 search/4000/b {\ color CSS stylesheet
|
27
|
+
!:mime text/css
|
28
|
+
0 search/4000/b {\ cursor CSS stylesheet
|
29
|
+
!:mime text/css
|
30
|
+
0 search/4000/b {\ direction CSS stylesheet
|
31
|
+
!:mime text/css
|
32
|
+
0 search/4000/b {\ display CSS stylesheet
|
33
|
+
!:mime text/css
|
34
|
+
0 search/4000/b {\ float CSS stylesheet
|
35
|
+
!:mime text/css
|
36
|
+
0 search/4000/b {\ font CSS stylesheet
|
37
|
+
!:mime text/css
|
38
|
+
0 search/4000/b {\ height CSS stylesheet
|
39
|
+
!:mime text/css
|
40
|
+
0 search/4000/b {\ left CSS stylesheet
|
41
|
+
!:mime text/css
|
42
|
+
0 search/4000/b {\ line- CSS stylesheet
|
43
|
+
!:mime text/css
|
44
|
+
0 search/4000/b {\ margin CSS stylesheet
|
45
|
+
!:mime text/css
|
46
|
+
0 search/4000/b {\ padding CSS stylesheet
|
47
|
+
!:mime text/css
|
48
|
+
0 search/4000/b {\ position CSS stylesheet
|
49
|
+
!:mime text/css
|
50
|
+
0 search/4000/b {\ right CSS stylesheet
|
51
|
+
!:mime text/css
|
52
|
+
0 search/4000/b {\ text- CSS stylesheet
|
53
|
+
!:mime text/css
|
54
|
+
0 search/4000/b {\ top CSS stylesheet
|
55
|
+
!:mime text/css
|
56
|
+
0 search/4000/b {\ width CSS stylesheet
|
57
|
+
!:mime text/css
|
58
|
+
0 search/4000/b {\ visibility CSS stylesheet
|
59
|
+
!:mime text/css
|
60
|
+
0 search/4000/b {\ -moz- CSS stylesheet
|
61
|
+
!:mime text/css
|
62
|
+
0 search/4000/b {\ -webkit- CSS stylesheet
|
63
|
+
!:mime text/css
|