Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 400 lines (391 sloc) 12.185 kb
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
1
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
2 .TH s3cmd 1
3 .SH NAME
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
4 s3cmd \- tool for managing Amazon S3 storage space and Amazon CloudFront content delivery network
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
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.
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
15
16 .SH COMMANDS
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
17 .PP
18 .B s3cmd
19 can do several \fIactions\fR specified by the following \fIcommands\fR.
20 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
21 s3cmd \fBmb\fR \fIs3://BUCKET\fR
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
22 Make bucket
23 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
24 s3cmd \fBrb\fR \fIs3://BUCKET\fR
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
25 Remove bucket
26 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
27 s3cmd \fBls\fR \fI[s3://BUCKET[/PREFIX]]\fR
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
28 List objects or buckets
29 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
30 s3cmd \fBla\fR \fI\fR
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
31 List all object in all buckets
32 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
33 s3cmd \fBput\fR \fIFILE [FILE...] s3://BUCKET[/PREFIX]\fR
34 Put file into bucket
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
35 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
36 s3cmd \fBget\fR \fIs3://BUCKET/OBJECT LOCAL_FILE\fR
37 Get file from bucket
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
38 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
39 s3cmd \fBdel\fR \fIs3://BUCKET/OBJECT\fR
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
40 Delete file from bucket
f298b34 @mludvig 2007-05-26 Michal Ludvig <michal@logix.cz>
mludvig authored
41 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
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
29893af @mludvig * S3/PkgInfo.py: Bumped up version to 0.9.7
mludvig authored
53 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
54 s3cmd \fBmv\fR \fIs3://BUCKET1/OBJECT1 s3://BUCKET2[/OBJECT2]\fR
55 Move object
7393bdb @mludvig * s3cmd, s3cmd.1: Updated help and man page.
mludvig authored
56 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
57 s3cmd \fBsetacl\fR \fIs3://BUCKET[/OBJECT]\fR
58 Modify Access control list for Bucket or Files
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
59 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
60 s3cmd \fBaccesslog\fR \fIs3://BUCKET\fR
61 Enable/disable bucket access logging
7393bdb @mludvig * s3cmd, s3cmd.1: Updated help and man page.
mludvig authored
62 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
63 s3cmd \fBsign\fR \fISTRING-TO-SIGN\fR
64 Sign arbitrary string using the secret key
65 .TP
66 s3cmd \fBfixbucket\fR \fIs3://BUCKET[/PREFIX]\fR
67 Fix invalid file names in a bucket
68
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
69
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
70 .PP
71 Commands for CloudFront management
72 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
73 s3cmd \fBcflist\fR \fI\fR
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
74 List CloudFront distribution points
75 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
76 s3cmd \fBcfinfo\fR \fI[cf://DIST_ID]\fR
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
77 Display CloudFront distribution point parameters
78 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
79 s3cmd \fBcfcreate\fR \fIs3://BUCKET\fR
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
80 Create CloudFront distribution point
81 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
82 s3cmd \fBcfdelete\fR \fIcf://DIST_ID\fR
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
83 Delete CloudFront distribution point
84 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
85 s3cmd \fBcfmodify\fR \fIcf://DIST_ID\fR
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
86 Change CloudFront distribution point parameters
87
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
88
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
89 .SH OPTIONS
90 .PP
91 Some of the below specified options can have their default
92 values set in
93 .B s3cmd
94 config file (by default $HOME/.s3cmd). As it's a simple text file
95 feel free to open it with your favorite text editor and do any
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
96 changes you like.
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
97 .TP
98 \fB\-h\fR, \fB\-\-help\fR
99 show this help message and exit
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
100 .TP
bf42f42 @mludvig 2007-06-16 Michal Ludvig <michal@logix.cz>
mludvig authored
101 \fB\-\-configure\fR
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
102 Invoke interactive (re)configuration tool.
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
103 .TP
bf42f42 @mludvig 2007-06-16 Michal Ludvig <michal@logix.cz>
mludvig authored
104 \fB\-c\fR FILE, \fB\-\-config\fR=FILE
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
105 Config file name. Defaults to /home/mludvig/.s3cfg
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
106 .TP
bf42f42 @mludvig 2007-06-16 Michal Ludvig <michal@logix.cz>
mludvig authored
107 \fB\-\-dump\-config\fR
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
108 Dump current configuration after parsing config files
109 and command line options and exit.
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
110 .TP
111 \fB\-n\fR, \fB\-\-dry\-run\fR
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
112 Only show what should be uploaded or downloaded but
113 don't actually do it. May still perform S3 requests to
114 get bucket listings and other information though (only
115 for file transfer commands)
116 .TP
117 \fB\-e\fR, \fB\-\-encrypt\fR
118 Encrypt files before uploading to S3.
119 .TP
120 \fB\-\-no\-encrypt\fR
121 Don't encrypt files.
122 .TP
123 \fB\-f\fR, \fB\-\-force\fR
124 Force overwrite and other dangerous operations.
125 .TP
126 \fB\-\-continue\fR
127 Continue getting a partially downloaded file (only for
128 [get] command).
129 .TP
130 \fB\-\-skip\-existing\fR
131 Skip over files that exist at the destination (only
132 for [get] and [sync] commands).
133 .TP
134 \fB\-r\fR, \fB\-\-recursive\fR
135 Recursive upload, download or removal.
136 .TP
da0fb7b @mludvig * s3cmd, s3cmd.1, format-manpage.pl: Improved --help text
mludvig authored
137 \fB\-\-check\-md5\fR
138 Check MD5 sums when comparing files for [sync].
139 (default)
140 .TP
141 \fB\-\-no\-check\-md5\fR
142 Do not check MD5 sums when comparing files for [sync].
143 Only size will be compared. May significantly speed up
144 transfer but may also miss some changed files.
145 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
146 \fB\-P\fR, \fB\-\-acl\-public\fR
147 Store objects with ACL allowing read for anyone.
148 .TP
149 \fB\-\-acl\-private\fR
150 Store objects with default ACL allowing access for you
151 only.
152 .TP
153 \fB\-\-acl\-grant\fR=PERMISSION:EMAIL or USER_CANONICAL_ID
154 Grant stated permission to a given amazon user.
155 Permission is one of: read, write, read_acp,
156 write_acp, full_control, all
157 .TP
158 \fB\-\-acl\-revoke\fR=PERMISSION:USER_CANONICAL_ID
159 Revoke stated permission for a given amazon user.
160 Permission is one of: read, write, read_acp, wr
161 ite_acp, full_control, all
7393bdb @mludvig * s3cmd, s3cmd.1: Updated help and man page.
mludvig authored
162 .TP
163 \fB\-\-delete\-removed\fR
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
164 Delete remote objects with no corresponding local file
165 [sync]
7393bdb @mludvig * s3cmd, s3cmd.1: Updated help and man page.
mludvig authored
166 .TP
167 \fB\-\-no\-delete\-removed\fR
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
168 Don't delete remote objects.
7393bdb @mludvig * s3cmd, s3cmd.1: Updated help and man page.
mludvig authored
169 .TP
170 \fB\-p\fR, \fB\-\-preserve\fR
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
171 Preserve filesystem attributes (mode, ownership,
172 timestamps). Default for [sync] command.
7393bdb @mludvig * s3cmd, s3cmd.1: Updated help and man page.
mludvig authored
173 .TP
174 \fB\-\-no\-preserve\fR
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
175 Don't store FS attributes
ee852c0 @mludvig * s3cmd.1, NEWS: Document --exclude
mludvig authored
176 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
177 \fB\-\-exclude\fR=GLOB
178 Filenames and paths matching GLOB will be excluded
179 from sync
ee852c0 @mludvig * s3cmd.1, NEWS: Document --exclude
mludvig authored
180 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
181 \fB\-\-exclude\-from\fR=FILE
182 Read --exclude GLOBs from FILE
2d7d554 @mludvig * s3cmd, s3cmd.1: Added GLOB (shell-style wildcard) exclude, renamed
mludvig authored
183 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
184 \fB\-\-rexclude\fR=REGEXP
185 Filenames and paths matching REGEXP (regular
186 expression) will be excluded from sync
2d7d554 @mludvig * s3cmd, s3cmd.1: Added GLOB (shell-style wildcard) exclude, renamed
mludvig authored
187 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
188 \fB\-\-rexclude\-from\fR=FILE
189 Read --rexclude REGEXPs from FILE
ee852c0 @mludvig * s3cmd.1, NEWS: Document --exclude
mludvig authored
190 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
191 \fB\-\-include\fR=GLOB
192 Filenames and paths matching GLOB will be included
193 even if previously excluded by one of
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
194 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
195 \fB\-\-(r)exclude(\-from)\fR patterns
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
196 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
197 \fB\-\-include\-from\fR=FILE
198 Read --include GLOBs from FILE
18c4a15 @mludvig 2007-08-14 Michal Ludvig <michal@logix.cz>
mludvig authored
199 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
200 \fB\-\-rinclude\fR=REGEXP
201 Same as --include but uses REGEXP (regular expression)
202 instead of GLOB
6454bfb @redsymbol Manual page documentation for --follow-symlinks
redsymbol authored
203 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
204 \fB\-\-rinclude\-from\fR=FILE
205 Read --rinclude REGEXPs from FILE
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
206 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
207 \fB\-\-bucket\-location\fR=BUCKET_LOCATION
208 Datacentre to create bucket in. As of now the
209 datacenters are: US (default), EU, us-west-1, and ap-
210 southeast-1
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
211 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
212 \fB\-\-reduced\-redundancy\fR, \fB\-\-rr\fR
213 Store object with 'Reduced redundancy'. Lower per-GB
214 price. [put, cp, mv]
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
215 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
216 \fB\-\-access\-logging\-target\-prefix\fR=LOG_TARGET_PREFIX
217 Target prefix for access logs (S3 URI) (for [cfmodify]
218 and [accesslog] commands)
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
219 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
220 \fB\-\-no\-access\-logging\fR
221 Disable access logging (for [cfmodify] and [accesslog]
222 commands)
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
223 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
224 \fB\-m\fR MIME/TYPE, \fB\-\-mime\-type\fR=MIME/TYPE
225 Default MIME-type to be set for objects stored.
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
226 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
227 \fB\-M\fR, \fB\-\-guess\-mime\-type\fR
228 Guess MIME-type of files by their extension. Falls
229 back to default MIME-Type as specified by --mime-type
230 option
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
231 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
232 \fB\-\-add\-header\fR=NAME:VALUE
233 Add a given HTTP header to the upload request. Can be
234 used multiple times. For instance set 'Expires' or
235 'Cache-Control' headers (or both) using this options
236 if you like.
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
237 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
238 \fB\-\-encoding\fR=ENCODING
239 Override autodetected terminal and filesystem encoding
240 (character set). Autodetected: UTF-8
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
241 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
242 \fB\-\-verbatim\fR
243 Use the S3 name as given on the command line. No pre-
244 processing, encoding, etc. Use with caution!
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
245 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
246 \fB\-\-list\-md5\fR
247 Include MD5 sums in bucket listings (only for 'ls'
248 command).
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
249 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
250 \fB\-H\fR, \fB\-\-human\-readable\-sizes\fR
251 Print sizes in human readable form (eg 1kB instead of
252 1234).
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
253 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
254 \fB\-\-progress\fR
255 Display progress meter (default on TTY).
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
256 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
257 \fB\-\-no\-progress\fR
258 Don't display progress meter (default on non-TTY).
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
259 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
260 \fB\-\-enable\fR
261 Enable given CloudFront distribution (only for
262 [cfmodify] command)
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
263 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
264 \fB\-\-disable\fR
265 Enable given CloudFront distribution (only for
266 [cfmodify] command)
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
267 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
268 \fB\-\-cf\-add\-cname\fR=CNAME
269 Add given CNAME to a CloudFront distribution (only for
270 [cfcreate] and [cfmodify] commands)
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
271 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
272 \fB\-\-cf\-remove\-cname\fR=CNAME
273 Remove given CNAME from a CloudFront distribution
274 (only for [cfmodify] command)
25f6f8c @mludvig * s3cmd, s3cmd.1, S3/S3.py: Display or don't display progress meter
mludvig authored
275 .TP
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
276 \fB\-\-cf\-comment\fR=COMMENT
277 Set COMMENT for a given CloudFront distribution (only
278 for [cfcreate] and [cfmodify] commands)
279 .TP
280 \fB\-\-cf\-default\-root\-object\fR=DEFAULT_ROOT_OBJECT
281 Set the default root object to return when no object
282 is specified in the URL. Use a relative path, i.e.
283 default/index.html instead of /default/index.html or
284 s3://bucket/default/index.html (only for [cfcreate]
285 and [cfmodify] commands)
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
286 .TP
bf42f42 @mludvig 2007-06-16 Michal Ludvig <michal@logix.cz>
mludvig authored
287 \fB\-v\fR, \fB\-\-verbose\fR
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
288 Enable verbose output.
289 .TP
bf42f42 @mludvig 2007-06-16 Michal Ludvig <michal@logix.cz>
mludvig authored
290 \fB\-d\fR, \fB\-\-debug\fR
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
291 Enable debug output.
292 .TP
bf42f42 @mludvig 2007-06-16 Michal Ludvig <michal@logix.cz>
mludvig authored
293 \fB\-\-version\fR
da0fb7b @mludvig * s3cmd, s3cmd.1, format-manpage.pl: Improved --help text
mludvig authored
294 Show s3cmd version (1.0.0) and exit.
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
295 .TP
296 \fB\-F\fR, \fB\-\-follow\-symlinks\fR
297 Follow symbolic links as if they are regular files
298
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
299
593ef06 @mludvig * format-manpage.pl: new manpage auto-formatter
mludvig authored
300 .SH EXAMPLES
ee852c0 @mludvig * s3cmd.1, NEWS: Document --exclude
mludvig authored
301 One of the most powerful commands of \fIs3cmd\fR is \fBs3cmd sync\fR used for
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
302 synchronising complete directory trees to or from remote S3 storage. To some extent
303 \fBs3cmd put\fR and \fBs3cmd get\fR share a similar behaviour with \fBsync\fR.
ee852c0 @mludvig * s3cmd.1, NEWS: Document --exclude
mludvig authored
304 .PP
305 Basic usage common in backup scenarios is as simple as:
306 .nf
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
307 s3cmd sync /local/path/ s3://test-bucket/backup/
ee852c0 @mludvig * s3cmd.1, NEWS: Document --exclude
mludvig authored
308 .fi
309 .PP
310 This command will find all files under /local/path directory and copy them
311 to corresponding paths under s3://test-bucket/backup on the remote side.
312 For example:
313 .nf
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
314 /local/path/\fBfile1.ext\fR \-> s3://bucket/backup/\fBfile1.ext\fR
315 /local/path/\fBdir123/file2.bin\fR \-> s3://bucket/backup/\fBdir123/file2.bin\fR
ee852c0 @mludvig * s3cmd.1, NEWS: Document --exclude
mludvig authored
316 .fi
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
317 .PP
318 However if the local path doesn't end with a slash the last directory's name
319 is used on the remote side as well. Compare these with the previous example:
320 .nf
321 s3cmd sync /local/path s3://test-bucket/backup/
322 .fi
323 will sync:
324 .nf
325 /local/\fBpath/file1.ext\fR \-> s3://bucket/backup/\fBpath/file1.ext\fR
326 /local/\fBpath/dir123/file2.bin\fR \-> s3://bucket/backup/\fBpath/dir123/file2.bin\fR
327 .fi
328 .PP
ee852c0 @mludvig * s3cmd.1, NEWS: Document --exclude
mludvig authored
329 To retrieve the files back from S3 use inverted syntax:
330 .nf
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
331 s3cmd sync s3://test-bucket/backup/ /tmp/restore/
ee852c0 @mludvig * s3cmd.1, NEWS: Document --exclude
mludvig authored
332 .fi
333 that will download files:
334 .nf
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
335 s3://bucket/backup/\fBfile1.ext\fR \-> /tmp/restore/\fBfile1.ext\fR
336 s3://bucket/backup/\fBdir123/file2.bin\fR \-> /tmp/restore/\fBdir123/file2.bin\fR
ee852c0 @mludvig * s3cmd.1, NEWS: Document --exclude
mludvig authored
337 .fi
2d7d554 @mludvig * s3cmd, s3cmd.1: Added GLOB (shell-style wildcard) exclude, renamed
mludvig authored
338 .PP
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
339 Without the trailing slash on source the behaviour is similar to
340 what has been demonstrated with upload:
341 .nf
342 s3cmd sync s3://test-bucket/backup /tmp/restore/
343 .fi
344 will download the files as:
345 .nf
346 s3://bucket/\fBbackup/file1.ext\fR \-> /tmp/restore/\fBbackup/file1.ext\fR
347 s3://bucket/\fBbackup/dir123/file2.bin\fR \-> /tmp/restore/\fBbackup/dir123/file2.bin\fR
348 .fi
349 .PP
350 All source file names, the bold ones above, are matched against \fBexclude\fR
351 rules and those that match are then re\-checked against \fBinclude\fR rules to see
352 whether they should be excluded or kept in the source list.
353 .PP
354 For the purpose of \fB\-\-exclude\fR and \fB\-\-include\fR matching only the
355 bold file names above are used. For instance only \fBpath/file1.ext\fR is tested
356 against the patterns, not \fI/local/\fBpath/file1.ext\fR
ee852c0 @mludvig * s3cmd.1, NEWS: Document --exclude
mludvig authored
357 .PP
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
358 Both \fB\-\-exclude\fR and \fB\-\-include\fR work with shell-style wildcards (a.k.a. GLOB).
359 For a greater flexibility s3cmd provides Regular-expression versions of the two exclude options
360 named \fB\-\-rexclude\fR and \fB\-\-rinclude\fR.
361 The options with ...\fB\-from\fR suffix (eg \-\-rinclude\-from) expect a filename as
362 an argument. Each line of such a file is treated as one pattern.
ee852c0 @mludvig * s3cmd.1, NEWS: Document --exclude
mludvig authored
363 .PP
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
364 There is only one set of patterns built from all \fB\-\-(r)exclude(\-from)\fR options
365 and similarly for include variant. Any file excluded with eg \-\-exclude can
366 be put back with a pattern found in \-\-rinclude\-from list.
ee852c0 @mludvig * s3cmd.1, NEWS: Document --exclude
mludvig authored
367 .PP
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
368 Run s3cmd with \fB\-\-dry\-run\fR to verify that your rules work as expected.
369 Use together with \fB\-\-debug\fR get detailed information
370 about matching file names against exclude and include rules.
ee852c0 @mludvig * s3cmd.1, NEWS: Document --exclude
mludvig authored
371 .PP
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
372 For example to exclude all files with ".jpg" extension except those beginning with a number use:
ee852c0 @mludvig * s3cmd.1, NEWS: Document --exclude
mludvig authored
373 .PP
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
374 \-\-exclude '*.jpg' \-\-rinclude '[0-9].*\.jpg'
375 .SH SEE ALSO
376 For the most up to date list of options run
377 .B s3cmd \-\-help
378 .br
379 For more info about usage, examples and other related info visit project homepage at
380 .br
381 .B http://s3tools.org
da0fb7b @mludvig * s3cmd, s3cmd.1, format-manpage.pl: Improved --help text
mludvig authored
382 .SH DONATIONS
383 Please consider a donation if you have found s3cmd useful:
384 .br
385 .B http://s3tools.org/donate
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
386 .SH AUTHOR
da0fb7b @mludvig * s3cmd, s3cmd.1, format-manpage.pl: Improved --help text
mludvig authored
387 Written by Michal Ludvig <mludvig@logix.net.nz> and 15+ contributors
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
388 .SH CONTACT, SUPPORT
389 Prefered way to get support is our mailing list:
390 .I s3tools\-general@lists.sourceforge.net
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
391 .SH REPORTING BUGS
392 Report bugs to
01a8052 @mludvig * s3cmd.1: Document all the new options and commands.
mludvig authored
393 .I s3tools\-bugs@lists.sourceforge.net
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
394 .SH COPYRIGHT
da0fb7b @mludvig * s3cmd, s3cmd.1, format-manpage.pl: Improved --help text
mludvig authored
395 Copyright \(co 2007,2008,2009,2010,2011 Michal Ludvig <http://www.logix.cz/michal>
dd4fec7 @mludvig 2007-04-09 Michal Ludvig <michal@logix.cz>
mludvig authored
396 .br
397 This is free software. You may redistribute copies of it under the terms of
398 the GNU General Public License version 2 <http://www.gnu.org/licenses/gpl.html>.
399 There is NO WARRANTY, to the extent permitted by law.
Something went wrong with that request. Please try again.