s3_cmd_bin 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +3 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +28 -0
  5. data/Rakefile +1 -0
  6. data/lib/s3_cmd_bin/version.rb +3 -0
  7. data/lib/s3_cmd_bin.rb +15 -0
  8. data/resources/ChangeLog +1462 -0
  9. data/resources/INSTALL +97 -0
  10. data/resources/LICENSE +339 -0
  11. data/resources/MANIFEST.in +2 -0
  12. data/resources/Makefile +4 -0
  13. data/resources/NEWS +234 -0
  14. data/resources/README +342 -0
  15. data/resources/S3/ACL.py +224 -0
  16. data/resources/S3/ACL.pyc +0 -0
  17. data/resources/S3/AccessLog.py +92 -0
  18. data/resources/S3/AccessLog.pyc +0 -0
  19. data/resources/S3/BidirMap.py +42 -0
  20. data/resources/S3/BidirMap.pyc +0 -0
  21. data/resources/S3/CloudFront.py +773 -0
  22. data/resources/S3/CloudFront.pyc +0 -0
  23. data/resources/S3/Config.py +294 -0
  24. data/resources/S3/Config.pyc +0 -0
  25. data/resources/S3/ConnMan.py +71 -0
  26. data/resources/S3/ConnMan.pyc +0 -0
  27. data/resources/S3/Exceptions.py +88 -0
  28. data/resources/S3/Exceptions.pyc +0 -0
  29. data/resources/S3/FileDict.py +53 -0
  30. data/resources/S3/FileDict.pyc +0 -0
  31. data/resources/S3/FileLists.py +517 -0
  32. data/resources/S3/FileLists.pyc +0 -0
  33. data/resources/S3/HashCache.py +53 -0
  34. data/resources/S3/HashCache.pyc +0 -0
  35. data/resources/S3/MultiPart.py +137 -0
  36. data/resources/S3/MultiPart.pyc +0 -0
  37. data/resources/S3/PkgInfo.py +14 -0
  38. data/resources/S3/PkgInfo.pyc +0 -0
  39. data/resources/S3/Progress.py +173 -0
  40. data/resources/S3/Progress.pyc +0 -0
  41. data/resources/S3/S3.py +979 -0
  42. data/resources/S3/S3.pyc +0 -0
  43. data/resources/S3/S3Uri.py +223 -0
  44. data/resources/S3/S3Uri.pyc +0 -0
  45. data/resources/S3/SimpleDB.py +178 -0
  46. data/resources/S3/SortedDict.py +66 -0
  47. data/resources/S3/SortedDict.pyc +0 -0
  48. data/resources/S3/Utils.py +462 -0
  49. data/resources/S3/Utils.pyc +0 -0
  50. data/resources/S3/__init__.py +0 -0
  51. data/resources/S3/__init__.pyc +0 -0
  52. data/resources/TODO +52 -0
  53. data/resources/artwork/AtomicClockRadio.ttf +0 -0
  54. data/resources/artwork/TypeRa.ttf +0 -0
  55. data/resources/artwork/site-top-full-size.xcf +0 -0
  56. data/resources/artwork/site-top-label-download.png +0 -0
  57. data/resources/artwork/site-top-label-s3cmd.png +0 -0
  58. data/resources/artwork/site-top-label-s3sync.png +0 -0
  59. data/resources/artwork/site-top-s3tools-logo.png +0 -0
  60. data/resources/artwork/site-top.jpg +0 -0
  61. data/resources/artwork/site-top.png +0 -0
  62. data/resources/artwork/site-top.xcf +0 -0
  63. data/resources/format-manpage.pl +196 -0
  64. data/resources/magic +63 -0
  65. data/resources/run-tests.py +537 -0
  66. data/resources/s3cmd +2116 -0
  67. data/resources/s3cmd.1 +435 -0
  68. data/resources/s3db +55 -0
  69. data/resources/setup.cfg +2 -0
  70. data/resources/setup.py +80 -0
  71. data/resources/testsuite.tar.gz +0 -0
  72. data/resources/upload-to-sf.sh +7 -0
  73. data/s3_cmd_bin.gemspec +23 -0
  74. metadata +152 -0
data/resources/s3cmd.1 ADDED
@@ -0,0 +1,435 @@
1
+
2
+ .TH s3cmd 1
3
+ .SH NAME
4
+ s3cmd \- tool for managing Amazon S3 storage space and Amazon CloudFront content delivery network
5
+ .SH SYNOPSIS
6
+ .B s3cmd
7
+ [\fIOPTIONS\fR] \fICOMMAND\fR [\fIPARAMETERS\fR]
8
+ .SH DESCRIPTION
9
+ .PP
10
+ .B s3cmd
11
+ is a command line client for copying files to/from
12
+ Amazon S3 (Simple Storage Service) and performing other
13
+ related tasks, for instance creating and removing buckets,
14
+ listing objects, etc.
15
+
16
+ .SH COMMANDS
17
+ .PP
18
+ .B s3cmd
19
+ can do several \fIactions\fR specified by the following \fIcommands\fR.
20
+ .TP
21
+ s3cmd \fBmb\fR \fIs3://BUCKET\fR
22
+ Make bucket
23
+ .TP
24
+ s3cmd \fBrb\fR \fIs3://BUCKET\fR
25
+ Remove bucket
26
+ .TP
27
+ s3cmd \fBls\fR \fI[s3://BUCKET[/PREFIX]]\fR
28
+ List objects or buckets
29
+ .TP
30
+ s3cmd \fBla\fR \fI\fR
31
+ List all object in all buckets
32
+ .TP
33
+ s3cmd \fBput\fR \fIFILE [FILE...] s3://BUCKET[/PREFIX]\fR
34
+ Put file into bucket
35
+ .TP
36
+ s3cmd \fBget\fR \fIs3://BUCKET/OBJECT LOCAL_FILE\fR
37
+ Get file from bucket
38
+ .TP
39
+ s3cmd \fBdel\fR \fIs3://BUCKET/OBJECT\fR
40
+ Delete file from bucket
41
+ .TP
42
+ s3cmd \fBsync\fR \fILOCAL_DIR s3://BUCKET[/PREFIX] or s3://BUCKET[/PREFIX] LOCAL_DIR\fR
43
+ Synchronize a directory tree to S3
44
+ .TP
45
+ s3cmd \fBdu\fR \fI[s3://BUCKET[/PREFIX]]\fR
46
+ Disk usage by buckets
47
+ .TP
48
+ s3cmd \fBinfo\fR \fIs3://BUCKET[/OBJECT]\fR
49
+ Get various information about Buckets or Files
50
+ .TP
51
+ s3cmd \fBcp\fR \fIs3://BUCKET1/OBJECT1 s3://BUCKET2[/OBJECT2]\fR
52
+ Copy object
53
+ .TP
54
+ s3cmd \fBmv\fR \fIs3://BUCKET1/OBJECT1 s3://BUCKET2[/OBJECT2]\fR
55
+ Move object
56
+ .TP
57
+ s3cmd \fBsetacl\fR \fIs3://BUCKET[/OBJECT]\fR
58
+ Modify Access control list for Bucket or Files
59
+ .TP
60
+ s3cmd \fBsetpolicy\fR \fIFILE s3://BUCKET\fR
61
+ Modify Bucket Policy
62
+ .TP
63
+ s3cmd \fBdelpolicy\fR \fIs3://BUCKET\fR
64
+ Delete Bucket Policy
65
+ .TP
66
+ s3cmd \fBaccesslog\fR \fIs3://BUCKET\fR
67
+ Enable/disable bucket access logging
68
+ .TP
69
+ s3cmd \fBsign\fR \fISTRING-TO-SIGN\fR
70
+ Sign arbitrary string using the secret key
71
+ .TP
72
+ s3cmd \fBsignurl\fR \fIs3://BUCKET/OBJECT expiry_epoch\fR
73
+ Sign an S3 URL to provide limited public access with expiry
74
+ .TP
75
+ s3cmd \fBfixbucket\fR \fIs3://BUCKET[/PREFIX]\fR
76
+ Fix invalid file names in a bucket
77
+
78
+
79
+ .PP
80
+ Commands for static WebSites configuration
81
+ .TP
82
+ s3cmd \fBws-create\fR \fIs3://BUCKET\fR
83
+ Create Website from bucket
84
+ .TP
85
+ s3cmd \fBws-delete\fR \fIs3://BUCKET\fR
86
+ Delete Website
87
+ .TP
88
+ s3cmd \fBws-info\fR \fIs3://BUCKET\fR
89
+ Info about Website
90
+
91
+
92
+ .PP
93
+ Commands for CloudFront management
94
+ .TP
95
+ s3cmd \fBcflist\fR \fI\fR
96
+ List CloudFront distribution points
97
+ .TP
98
+ s3cmd \fBcfinfo\fR \fI[cf://DIST_ID]\fR
99
+ Display CloudFront distribution point parameters
100
+ .TP
101
+ s3cmd \fBcfcreate\fR \fIs3://BUCKET\fR
102
+ Create CloudFront distribution point
103
+ .TP
104
+ s3cmd \fBcfdelete\fR \fIcf://DIST_ID\fR
105
+ Delete CloudFront distribution point
106
+ .TP
107
+ s3cmd \fBcfmodify\fR \fIcf://DIST_ID\fR
108
+ Change CloudFront distribution point parameters
109
+ .TP
110
+ s3cmd \fBcfinvalinfo\fR \fIcf://DIST_ID[/INVAL_ID]\fR
111
+ Display CloudFront invalidation request(s) status
112
+
113
+
114
+ .SH OPTIONS
115
+ .PP
116
+ Some of the below specified options can have their default
117
+ values set in
118
+ .B s3cmd
119
+ config file (by default $HOME/.s3cmd). As it's a simple text file
120
+ feel free to open it with your favorite text editor and do any
121
+ changes you like.
122
+ .TP
123
+ \fB\-h\fR, \fB\-\-help\fR
124
+ show this help message and exit
125
+ .TP
126
+ \fB\-\-configure\fR
127
+ Invoke interactive (re)configuration tool. Optionally use as '--configure s3://come-bucket' to test access to a specific bucket instead of attempting to list them all.
128
+ .TP
129
+ \fB\-c\fR FILE, \fB\-\-config\fR=FILE
130
+ Config file name. Defaults to /home/mludvig/.s3cfg
131
+ .TP
132
+ \fB\-\-dump\-config\fR
133
+ Dump current configuration after parsing config files and command line options and exit.
134
+ .TP
135
+ \fB\-\-access_key\fR=ACCESS_KEY
136
+ AWS Access Key
137
+ .TP
138
+ \fB\-\-secret_key\fR=SECRET_KEY
139
+ AWS Secret Key
140
+ .TP
141
+ \fB\-n\fR, \fB\-\-dry\-run\fR
142
+ Only show what should be uploaded or downloaded but don't actually do it. May still perform S3 requests to get bucket listings and other information though (only for file transfer commands)
143
+ .TP
144
+ \fB\-e\fR, \fB\-\-encrypt\fR
145
+ Encrypt files before uploading to S3.
146
+ .TP
147
+ \fB\-\-no\-encrypt\fR
148
+ Don't encrypt files.
149
+ .TP
150
+ \fB\-f\fR, \fB\-\-force\fR
151
+ Force overwrite and other dangerous operations.
152
+ .TP
153
+ \fB\-\-continue\fR
154
+ Continue getting a partially downloaded file (only for [get] command).
155
+ .TP
156
+ \fB\-\-skip\-existing\fR
157
+ Skip over files that exist at the destination (only for [get] and [sync] commands).
158
+ .TP
159
+ \fB\-r\fR, \fB\-\-recursive\fR
160
+ Recursive upload, download or removal.
161
+ .TP
162
+ \fB\-\-check\-md5\fR
163
+ Check MD5 sums when comparing files for [sync]. (default)
164
+ .TP
165
+ \fB\-\-no\-check\-md5\fR
166
+ Do not check MD5 sums when comparing files for [sync]. Only size will be compared. May significantly speed up transfer but may also miss some changed files.
167
+ .TP
168
+ \fB\-P\fR, \fB\-\-acl\-public\fR
169
+ Store objects with ACL allowing read for anyone.
170
+ .TP
171
+ \fB\-\-acl\-private\fR
172
+ Store objects with default ACL allowing access for you only.
173
+ .TP
174
+ \fB\-\-acl\-grant\fR=PERMISSION:EMAIL or USER_CANONICAL_ID
175
+ Grant stated permission to a given amazon user. Permission is one of: read, write, read_acp, write_acp, full_control, all
176
+ .TP
177
+ \fB\-\-acl\-revoke\fR=PERMISSION:USER_CANONICAL_ID
178
+ Revoke stated permission for a given amazon user. Permission is one of: read, write, read_acp, wr ite_acp, full_control, all
179
+ .TP
180
+ \fB\-\-delete\-removed\fR
181
+ Delete remote objects with no corresponding local file [sync]
182
+ .TP
183
+ \fB\-\-no\-delete\-removed\fR
184
+ Don't delete remote objects.
185
+ .TP
186
+ \fB\-\-delete\-after\fR
187
+ Perform deletes after new uploads [sync]
188
+ .TP
189
+ \fB\-\-delay\-updates\fR
190
+ Put all updated files into place at end [sync]
191
+ .TP
192
+ \fB\-\-add\-destination\fR=ADDITIONAL_DESTINATIONS
193
+ Additional destination for parallel uploads, in addition to last arg. May be repeated.
194
+ .TP
195
+ \fB\-\-delete\-after\-fetch\fR
196
+ Delete remote objects after fetching to local file (only for [get] and [sync] commands).
197
+ .TP
198
+ \fB\-p\fR, \fB\-\-preserve\fR
199
+ Preserve filesystem attributes (mode, ownership, timestamps). Default for [sync] command.
200
+ .TP
201
+ \fB\-\-no\-preserve\fR
202
+ Don't store FS attributes
203
+ .TP
204
+ \fB\-\-exclude\fR=GLOB
205
+ Filenames and paths matching GLOB will be excluded from sync
206
+ .TP
207
+ \fB\-\-exclude\-from\fR=FILE
208
+ Read --exclude GLOBs from FILE
209
+ .TP
210
+ \fB\-\-rexclude\fR=REGEXP
211
+ Filenames and paths matching REGEXP (regular expression) will be excluded from sync
212
+ .TP
213
+ \fB\-\-rexclude\-from\fR=FILE
214
+ Read --rexclude REGEXPs from FILE
215
+ .TP
216
+ \fB\-\-include\fR=GLOB
217
+ Filenames and paths matching GLOB will be included even if previously excluded by one of --(r)exclude(-from) patterns
218
+ .TP
219
+ \fB\-\-include\-from\fR=FILE
220
+ Read --include GLOBs from FILE
221
+ .TP
222
+ \fB\-\-rinclude\fR=REGEXP
223
+ Same as --include but uses REGEXP (regular expression) instead of GLOB
224
+ .TP
225
+ \fB\-\-rinclude\-from\fR=FILE
226
+ Read --rinclude REGEXPs from FILE
227
+ .TP
228
+ \fB\-\-bucket\-location\fR=BUCKET_LOCATION
229
+ Datacentre to create bucket in. As of now the datacenters are: US (default), EU, ap-northeast-1, ap-southeast-1, sa-east-1, us-west-1 and us-west-2
230
+ .TP
231
+ \fB\-\-reduced\-redundancy\fR, \fB\-\-rr\fR
232
+ Store object with 'Reduced redundancy'. Lower per-GB price. [put, cp, mv]
233
+ .TP
234
+ \fB\-\-access\-logging\-target\-prefix\fR=LOG_TARGET_PREFIX
235
+ Target prefix for access logs (S3 URI) (for [cfmodify] and [accesslog] commands)
236
+ .TP
237
+ \fB\-\-no\-access\-logging\fR
238
+ Disable access logging (for [cfmodify] and [accesslog] commands)
239
+ .TP
240
+ \fB\-\-default\-mime\-type\fR
241
+ Default MIME-type for stored objects. Application default is binary/octet-stream.
242
+ .TP
243
+ \fB\-M\fR, \fB\-\-guess\-mime\-type\fR
244
+ Guess MIME-type of files by their extension or mime magic. Fall back to default MIME-Type as specified by \fB--default-mime-type\fR option
245
+ .TP
246
+ \fB\-\-no\-guess\-mime\-type\fR
247
+ Don't guess MIME-type and use the default type instead.
248
+ .TP
249
+ \fB\-m\fR MIME/TYPE, \fB\-\-mime\-type\fR=MIME/TYPE
250
+ Force MIME-type. Override both \fB--default-mime-type\fR and \fB--guess-mime-type\fR.
251
+ .TP
252
+ \fB\-\-add\-header\fR=NAME:VALUE
253
+ Add a given HTTP header to the upload request. Can be used multiple times. For instance set 'Expires' or 'Cache-Control' headers (or both) using this options if you like.
254
+ .TP
255
+ \fB\-\-encoding\fR=ENCODING
256
+ Override autodetected terminal and filesystem encoding (character set). Autodetected: UTF-8
257
+ .TP
258
+ \fB\-\-add\-encoding\-exts\fR=EXTENSIONs
259
+ Add encoding to these comma delimited extensions i.e. (css,js,html) when uploading to S3 )
260
+ .TP
261
+ \fB\-\-verbatim\fR
262
+ Use the S3 name as given on the command line. No pre-processing, encoding, etc. Use with caution!
263
+ .TP
264
+ \fB\-\-disable\-multipart\fR
265
+ Disable multipart upload on files bigger than --multipart-chunk-size-mb
266
+ .TP
267
+ \fB\-\-multipart\-chunk\-size\-mb\fR=SIZE
268
+ Size of each chunk of a multipart upload. Files bigger than SIZE are automatically uploaded as multithreaded-multipart, smaller files are uploaded using the traditional method. SIZE is in Mega-Bytes,
269
+ default chunk size is noneMB, minimum allowed chunk size is 5MB, maximum is 5GB.
270
+ .TP
271
+ \fB\-\-list\-md5\fR
272
+ Include MD5 sums in bucket listings (only for 'ls' command).
273
+ .TP
274
+ \fB\-H\fR, \fB\-\-human\-readable\-sizes\fR
275
+ Print sizes in human readable form (eg 1kB instead of 1234).
276
+ .TP
277
+ \fB\-\-ws\-index\fR=WEBSITE_INDEX
278
+ Name of error-document (only for [ws-create] command)
279
+ .TP
280
+ \fB\-\-ws\-error\fR=WEBSITE_ERROR
281
+ Name of index-document (only for [ws-create] command)
282
+ .TP
283
+ \fB\-\-progress\fR
284
+ Display progress meter (default on TTY).
285
+ .TP
286
+ \fB\-\-no\-progress\fR
287
+ Don't display progress meter (default on non-TTY).
288
+ .TP
289
+ \fB\-\-enable\fR
290
+ Enable given CloudFront distribution (only for [cfmodify] command)
291
+ .TP
292
+ \fB\-\-disable\fR
293
+ Enable given CloudFront distribution (only for [cfmodify] command)
294
+ .TP
295
+ \fB\-\-cf\-invalidate\fR
296
+ Invalidate the uploaded filed in CloudFront. Also see [cfinval] command.
297
+ .TP
298
+ \fB\-\-cf\-invalidate\-default\-index\fR
299
+ When using Custom Origin and S3 static website, invalidate the default index file.
300
+ .TP
301
+ \fB\-\-cf\-no\-invalidate\-default\-index\-root\fR
302
+ When using Custom Origin and S3 static website, don't invalidate the path to the default index file.
303
+ .TP
304
+ \fB\-\-cf\-add\-cname\fR=CNAME
305
+ Add given CNAME to a CloudFront distribution (only for [cfcreate] and [cfmodify] commands)
306
+ .TP
307
+ \fB\-\-cf\-remove\-cname\fR=CNAME
308
+ Remove given CNAME from a CloudFront distribution (only for [cfmodify] command)
309
+ .TP
310
+ \fB\-\-cf\-comment\fR=COMMENT
311
+ Set COMMENT for a given CloudFront distribution (only for [cfcreate] and [cfmodify] commands)
312
+ .TP
313
+ \fB\-\-cf\-default\-root\-object\fR=DEFAULT_ROOT_OBJECT
314
+ Set the default root object to return when no object is specified in the URL. Use a relative path, i.e. default/index.html instead of /default/index.html or s3://bucket/default/index.html (only for
315
+ [cfcreate] and [cfmodify] commands)
316
+ .TP
317
+ \fB\-v\fR, \fB\-\-verbose\fR
318
+ Enable verbose output.
319
+ .TP
320
+ \fB\-d\fR, \fB\-\-debug\fR
321
+ Enable debug output.
322
+ .TP
323
+ \fB\-\-version\fR
324
+ Show s3cmd version (1.5.0-alpha3) and exit.
325
+ .TP
326
+ \fB\-F\fR, \fB\-\-follow\-symlinks\fR
327
+ Follow symbolic links as if they are regular files
328
+ .TP
329
+ \fB\-\-cache\-file\fR=FILE
330
+ Cache FILE containing local source MD5 values
331
+ .TP
332
+ \fB\-q\fR, \fB\-\-quiet\fR
333
+ Silence output on stdout
334
+
335
+
336
+ .SH EXAMPLES
337
+ One of the most powerful commands of \fIs3cmd\fR is \fBs3cmd sync\fR used for
338
+ synchronising complete directory trees to or from remote S3 storage. To some extent
339
+ \fBs3cmd put\fR and \fBs3cmd get\fR share a similar behaviour with \fBsync\fR.
340
+ .PP
341
+ Basic usage common in backup scenarios is as simple as:
342
+ .nf
343
+ s3cmd sync /local/path/ s3://test-bucket/backup/
344
+ .fi
345
+ .PP
346
+ This command will find all files under /local/path directory and copy them
347
+ to corresponding paths under s3://test-bucket/backup on the remote side.
348
+ For example:
349
+ .nf
350
+ /local/path/\fBfile1.ext\fR \-> s3://bucket/backup/\fBfile1.ext\fR
351
+ /local/path/\fBdir123/file2.bin\fR \-> s3://bucket/backup/\fBdir123/file2.bin\fR
352
+ .fi
353
+ .PP
354
+ However if the local path doesn't end with a slash the last directory's name
355
+ is used on the remote side as well. Compare these with the previous example:
356
+ .nf
357
+ s3cmd sync /local/path s3://test-bucket/backup/
358
+ .fi
359
+ will sync:
360
+ .nf
361
+ /local/\fBpath/file1.ext\fR \-> s3://bucket/backup/\fBpath/file1.ext\fR
362
+ /local/\fBpath/dir123/file2.bin\fR \-> s3://bucket/backup/\fBpath/dir123/file2.bin\fR
363
+ .fi
364
+ .PP
365
+ To retrieve the files back from S3 use inverted syntax:
366
+ .nf
367
+ s3cmd sync s3://test-bucket/backup/ /tmp/restore/
368
+ .fi
369
+ that will download files:
370
+ .nf
371
+ s3://bucket/backup/\fBfile1.ext\fR \-> /tmp/restore/\fBfile1.ext\fR
372
+ s3://bucket/backup/\fBdir123/file2.bin\fR \-> /tmp/restore/\fBdir123/file2.bin\fR
373
+ .fi
374
+ .PP
375
+ Without the trailing slash on source the behaviour is similar to
376
+ what has been demonstrated with upload:
377
+ .nf
378
+ s3cmd sync s3://test-bucket/backup /tmp/restore/
379
+ .fi
380
+ will download the files as:
381
+ .nf
382
+ s3://bucket/\fBbackup/file1.ext\fR \-> /tmp/restore/\fBbackup/file1.ext\fR
383
+ s3://bucket/\fBbackup/dir123/file2.bin\fR \-> /tmp/restore/\fBbackup/dir123/file2.bin\fR
384
+ .fi
385
+ .PP
386
+ All source file names, the bold ones above, are matched against \fBexclude\fR
387
+ rules and those that match are then re\-checked against \fBinclude\fR rules to see
388
+ whether they should be excluded or kept in the source list.
389
+ .PP
390
+ For the purpose of \fB\-\-exclude\fR and \fB\-\-include\fR matching only the
391
+ bold file names above are used. For instance only \fBpath/file1.ext\fR is tested
392
+ against the patterns, not \fI/local/\fBpath/file1.ext\fR
393
+ .PP
394
+ Both \fB\-\-exclude\fR and \fB\-\-include\fR work with shell-style wildcards (a.k.a. GLOB).
395
+ For a greater flexibility s3cmd provides Regular-expression versions of the two exclude options
396
+ named \fB\-\-rexclude\fR and \fB\-\-rinclude\fR.
397
+ The options with ...\fB\-from\fR suffix (eg \-\-rinclude\-from) expect a filename as
398
+ an argument. Each line of such a file is treated as one pattern.
399
+ .PP
400
+ There is only one set of patterns built from all \fB\-\-(r)exclude(\-from)\fR options
401
+ and similarly for include variant. Any file excluded with eg \-\-exclude can
402
+ be put back with a pattern found in \-\-rinclude\-from list.
403
+ .PP
404
+ Run s3cmd with \fB\-\-dry\-run\fR to verify that your rules work as expected.
405
+ Use together with \fB\-\-debug\fR get detailed information
406
+ about matching file names against exclude and include rules.
407
+ .PP
408
+ For example to exclude all files with ".jpg" extension except those beginning with a number use:
409
+ .PP
410
+ \-\-exclude '*.jpg' \-\-rinclude '[0-9].*\.jpg'
411
+ .SH SEE ALSO
412
+ For the most up to date list of options run
413
+ .B s3cmd \-\-help
414
+ .br
415
+ For more info about usage, examples and other related info visit project homepage at
416
+ .br
417
+ .B http://s3tools.org
418
+ .SH DONATIONS
419
+ Please consider a donation if you have found s3cmd useful:
420
+ .br
421
+ .B http://s3tools.org/donate
422
+ .SH AUTHOR
423
+ Written by Michal Ludvig <mludvig@logix.net.nz> and 15+ contributors
424
+ .SH CONTACT, SUPPORT
425
+ Prefered way to get support is our mailing list:
426
+ .I s3tools\-general@lists.sourceforge.net
427
+ .SH REPORTING BUGS
428
+ Report bugs to
429
+ .I s3tools\-bugs@lists.sourceforge.net
430
+ .SH COPYRIGHT
431
+ Copyright \(co 2007,2008,2009,2010,2011,2012 Michal Ludvig <http://www.logix.cz/michal>
432
+ .br
433
+ This is free software. You may redistribute copies of it under the terms of
434
+ the GNU General Public License version 2 <http://www.gnu.org/licenses/gpl.html>.
435
+ There is NO WARRANTY, to the extent permitted by law.
data/resources/s3db ADDED
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env python
2
+ # vim: set fileencoding=utf-8 :
3
+ ## Amazon S3 manager
4
+ ## Author: Michal Ludvig <michal@logix.cz>
5
+ ## http://www.logix.cz/michal
6
+ ## License: GPL Version 2
7
+
8
+ import sys
9
+ import os
10
+ import logging
11
+
12
+ from optparse import OptionParser, Option, OptionValueError, IndentedHelpFormatter
13
+ from logging import debug, info, warning, error
14
+
15
+ ## Our modules
16
+ from S3 import PkgInfo
17
+ from S3.SimpleDB import SimpleDB
18
+ from S3.Config import Config
19
+ from S3.Exceptions import *
20
+
21
+ def display_response(response):
22
+ print "%s\n%s\n%s" % ('-'*40, response['data'], '-'*40)
23
+
24
+ if __name__ == '__main__':
25
+ if float("%d.%d" %(sys.version_info[0], sys.version_info[1])) < 2.4:
26
+ sys.stderr.write("ERROR: Python 2.4 or higher required, sorry.\n")
27
+ sys.exit(1)
28
+ cfg = Config(os.getenv("HOME")+"/.s3cfg")
29
+
30
+ logging.root.setLevel(logging.DEBUG)
31
+ sdb = SimpleDB(cfg)
32
+
33
+ try:
34
+ display_response(sdb.ListDomains())
35
+
36
+ display_response(sdb.CreateDomain("logix.cz-test"))
37
+
38
+ display_response(sdb.ListDomains())
39
+
40
+ display_response(sdb.PutAttributes("logix.cz-test", "AbCd", {'First': "One", "Second" : 2, "Third" : u"drei"}))
41
+ display_response(sdb.PutAttributes("logix.cz-test", "XyZ", {'xyz' : ['x', 'y', 'z'], 'Third' : u'traja'}))
42
+
43
+ display_response(sdb.GetAttributes("logix.cz-test", "AbCd", ['Second', 'Third']))
44
+ display_response(sdb.GetAttributes("logix.cz-test", "XyZ"))
45
+
46
+ display_response(sdb.Query("logix.cz-test", "['xyz' = 'z']"))
47
+
48
+ display_response(sdb.DeleteDomain("logix.cz-test"))
49
+
50
+ display_response(sdb.ListDomains())
51
+ except S3Error, e:
52
+ error(e)
53
+ error(e.info)
54
+
55
+ # vim:et:ts=4:sts=4:ai
@@ -0,0 +1,2 @@
1
+ [sdist]
2
+ formats = gztar,zip
@@ -0,0 +1,80 @@
1
+ from distutils.core import setup
2
+ import sys
3
+ import os
4
+
5
+ import S3.PkgInfo
6
+
7
+ if float("%d.%d" % sys.version_info[:2]) < 2.4:
8
+ sys.stderr.write("Your Python version %d.%d.%d is not supported.\n" % sys.version_info[:3])
9
+ sys.stderr.write("S3cmd requires Python 2.4 or newer.\n")
10
+ sys.exit(1)
11
+
12
+ try:
13
+ import xml.etree.ElementTree as ET
14
+ print "Using xml.etree.ElementTree for XML processing"
15
+ except ImportError, e:
16
+ sys.stderr.write(str(e) + "\n")
17
+ try:
18
+ import elementtree.ElementTree as ET
19
+ print "Using elementtree.ElementTree for XML processing"
20
+ except ImportError, e:
21
+ sys.stderr.write(str(e) + "\n")
22
+ sys.stderr.write("Please install ElementTree module from\n")
23
+ sys.stderr.write("http://effbot.org/zone/element-index.htm\n")
24
+ sys.exit(1)
25
+
26
+ try:
27
+ ## Remove 'MANIFEST' file to force
28
+ ## distutils to recreate it.
29
+ ## Only in "sdist" stage. Otherwise
30
+ ## it makes life difficult to packagers.
31
+ if sys.argv[1] == "sdist":
32
+ os.unlink("MANIFEST")
33
+ except:
34
+ pass
35
+
36
+ ## Re-create the manpage
37
+ ## (Beware! Perl script on the loose!!)
38
+ if sys.argv[1] == "sdist":
39
+ if os.stat_result(os.stat("s3cmd.1")).st_mtime < os.stat_result(os.stat("s3cmd")).st_mtime:
40
+ sys.stderr.write("Re-create man page first!\n")
41
+ sys.stderr.write("Run: ./s3cmd --help | ./format-manpage.pl > s3cmd.1\n")
42
+ sys.exit(1)
43
+
44
+ ## Don't install manpages and docs when $S3CMD_PACKAGING is set
45
+ ## This was a requirement of Debian package maintainer.
46
+ if not os.getenv("S3CMD_PACKAGING"):
47
+ man_path = os.getenv("S3CMD_INSTPATH_MAN") or "share/man"
48
+ doc_path = os.getenv("S3CMD_INSTPATH_DOC") or "share/doc/packages"
49
+ data_files = [
50
+ (doc_path+"/s3cmd", [ "README", "INSTALL", "NEWS" ]),
51
+ (man_path+"/man1", [ "s3cmd.1" ] ),
52
+ ]
53
+ else:
54
+ data_files = None
55
+
56
+ ## Main distutils info
57
+ setup(
58
+ ## Content description
59
+ name = S3.PkgInfo.package,
60
+ version = S3.PkgInfo.version,
61
+ packages = [ 'S3' ],
62
+ scripts = ['s3cmd'],
63
+ data_files = data_files,
64
+
65
+ ## Packaging details
66
+ author = "Michal Ludvig",
67
+ author_email = "michal@logix.cz",
68
+ url = S3.PkgInfo.url,
69
+ license = S3.PkgInfo.license,
70
+ description = S3.PkgInfo.short_description,
71
+ long_description = """
72
+ %s
73
+
74
+ Authors:
75
+ --------
76
+ Michal Ludvig <michal@logix.cz>
77
+ """ % (S3.PkgInfo.long_description)
78
+ )
79
+
80
+ # vim:et:ts=4:sts=4:ai
Binary file
@@ -0,0 +1,7 @@
1
+ #!/bin/sh
2
+
3
+ VERSION=$(./s3cmd --version | awk '{print $NF}')
4
+ echo -e "Uploading \033[32ms3cmd \033[31m${VERSION}\033[0m ..."
5
+ #rsync -avP dist/s3cmd-${VERSION}.* ludvigm@frs.sourceforge.net:uploads/
6
+ ln -f NEWS README.txt
7
+ rsync -avP dist/s3cmd-${VERSION}.* README.txt ludvigm,s3tools@frs.sourceforge.net:/home/frs/project/s/s3/s3tools/s3cmd/${VERSION}/
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 's3_cmd_bin/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "s3_cmd_bin"
8
+ spec.version = S3CmdBin::VERSION
9
+ spec.authors = ["Zac McCormick"]
10
+ spec.email = ["zac.mccormick@gmail.com"]
11
+ spec.description = %q{Provides an embedded version of s3cmd}
12
+ spec.summary = %q{Provides an embedded version of s3cmd}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake"
23
+ end