s3cmd.1 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722
  1. .\" !!! IMPORTANT: This file is generated from s3cmd \-\-help output using format-manpage.pl
  2. .\" !!! Do your changes either in s3cmd file or in 'format\-manpage.pl' otherwise
  3. .\" !!! they will be overwritten!
  4. .TH s3cmd 1
  5. .SH NAME
  6. s3cmd \- tool for managing Amazon S3 storage space and Amazon CloudFront content delivery network
  7. .SH SYNOPSIS
  8. .B s3cmd
  9. [\fIOPTIONS\fR] \fICOMMAND\fR [\fIPARAMETERS\fR]
  10. .SH DESCRIPTION
  11. .PP
  12. .B s3cmd
  13. is a command line client for copying files to/from
  14. Amazon S3 (Simple Storage Service) and performing other
  15. related tasks, for instance creating and removing buckets,
  16. listing objects, etc.
  17. .SH COMMANDS
  18. .PP
  19. .B s3cmd
  20. can do several \fIactions\fR specified by the following \fIcommands\fR.
  21. .TP
  22. s3cmd \fBmb\fR \fIs3://BUCKET\fR
  23. Make bucket
  24. .TP
  25. s3cmd \fBrb\fR \fIs3://BUCKET\fR
  26. Remove bucket
  27. .TP
  28. s3cmd \fBls\fR \fI[s3://BUCKET[/PREFIX]]\fR
  29. List objects or buckets
  30. .TP
  31. s3cmd \fBla\fR \fI\fR
  32. List all object in all buckets
  33. .TP
  34. s3cmd \fBput\fR \fIFILE [FILE...] s3://BUCKET[/PREFIX]\fR
  35. Put file into bucket
  36. .TP
  37. s3cmd \fBget\fR \fIs3://BUCKET/OBJECT LOCAL_FILE\fR
  38. Get file from bucket
  39. .TP
  40. s3cmd \fBdel\fR \fIs3://BUCKET/OBJECT\fR
  41. Delete file from bucket
  42. .TP
  43. s3cmd \fBrm\fR \fIs3://BUCKET/OBJECT\fR
  44. Delete file from bucket (alias for del)
  45. .TP
  46. s3cmd \fBrestore\fR \fIs3://BUCKET/OBJECT\fR
  47. Restore file from Glacier storage
  48. .TP
  49. s3cmd \fBsync\fR \fILOCAL_DIR s3://BUCKET[/PREFIX] or s3://BUCKET[/PREFIX] LOCAL_DIR or s3://BUCKET[/PREFIX] s3://BUCKET[/PREFIX]\fR
  50. Synchronize a directory tree to S3 (checks files freshness using size and md5 checksum, unless overridden by options, see below)
  51. .TP
  52. s3cmd \fBdu\fR \fI[s3://BUCKET[/PREFIX]]\fR
  53. Disk usage by buckets
  54. .TP
  55. s3cmd \fBinfo\fR \fIs3://BUCKET[/OBJECT]\fR
  56. Get various information about Buckets or Files
  57. .TP
  58. s3cmd \fBcp\fR \fIs3://BUCKET1/OBJECT1 s3://BUCKET2[/OBJECT2]\fR
  59. Copy object
  60. .TP
  61. s3cmd \fBmodify\fR \fIs3://BUCKET1/OBJECT\fR
  62. Modify object metadata
  63. .TP
  64. s3cmd \fBmv\fR \fIs3://BUCKET1/OBJECT1 s3://BUCKET2[/OBJECT2]\fR
  65. Move object
  66. .TP
  67. s3cmd \fBsetacl\fR \fIs3://BUCKET[/OBJECT]\fR
  68. Modify Access control list for Bucket or Files
  69. .TP
  70. s3cmd \fBsetpolicy\fR \fIFILE s3://BUCKET\fR
  71. Modify Bucket Policy
  72. .TP
  73. s3cmd \fBdelpolicy\fR \fIs3://BUCKET\fR
  74. Delete Bucket Policy
  75. .TP
  76. s3cmd \fBsetcors\fR \fIFILE s3://BUCKET\fR
  77. Modify Bucket CORS
  78. .TP
  79. s3cmd \fBdelcors\fR \fIs3://BUCKET\fR
  80. Delete Bucket CORS
  81. .TP
  82. s3cmd \fBpayer\fR \fIs3://BUCKET\fR
  83. Modify Bucket Requester Pays policy
  84. .TP
  85. s3cmd \fBmultipart\fR \fIs3://BUCKET [Id]\fR
  86. Show multipart uploads
  87. .TP
  88. s3cmd \fBabortmp\fR \fIs3://BUCKET/OBJECT Id\fR
  89. Abort a multipart upload
  90. .TP
  91. s3cmd \fBlistmp\fR \fIs3://BUCKET/OBJECT Id\fR
  92. List parts of a multipart upload
  93. .TP
  94. s3cmd \fBaccesslog\fR \fIs3://BUCKET\fR
  95. Enable/disable bucket access logging
  96. .TP
  97. s3cmd \fBsign\fR \fISTRING\-TO\-SIGN\fR
  98. Sign arbitrary string using the secret key
  99. .TP
  100. s3cmd \fBsignurl\fR \fIs3://BUCKET/OBJECT <expiry_epoch|+expiry_offset>\fR
  101. Sign an S3 URL to provide limited public access with expiry
  102. .TP
  103. s3cmd \fBfixbucket\fR \fIs3://BUCKET[/PREFIX]\fR
  104. Fix invalid file names in a bucket
  105. .TP
  106. s3cmd \fBexpire\fR \fIs3://BUCKET\fR
  107. Set or delete expiration rule for the bucket
  108. .TP
  109. s3cmd \fBsetlifecycle\fR \fIFILE s3://BUCKET\fR
  110. Upload a lifecycle policy for the bucket
  111. .TP
  112. s3cmd \fBgetlifecycle\fR \fIs3://BUCKET\fR
  113. Get a lifecycle policy for the bucket
  114. .TP
  115. s3cmd \fBdellifecycle\fR \fIs3://BUCKET\fR
  116. Remove a lifecycle policy for the bucket
  117. .TP
  118. s3cmd \fBsetnotification\fR \fIFILE s3://BUCKET\fR
  119. Upload a notification policy for the bucket
  120. .TP
  121. s3cmd \fBgetnotification\fR \fIs3://BUCKET\fR
  122. Get a notification policy for the bucket
  123. .TP
  124. s3cmd \fBdelnotification\fR \fIs3://BUCKET\fR
  125. Remove a notification policy for the bucket
  126. .PP
  127. Commands for static WebSites configuration
  128. .TP
  129. s3cmd \fBws\-create\fR \fIs3://BUCKET\fR
  130. Create Website from bucket
  131. .TP
  132. s3cmd \fBws\-delete\fR \fIs3://BUCKET\fR
  133. Delete Website
  134. .TP
  135. s3cmd \fBws\-info\fR \fIs3://BUCKET\fR
  136. Info about Website
  137. .PP
  138. Commands for CloudFront management
  139. .TP
  140. s3cmd \fBcflist\fR \fI\fR
  141. List CloudFront distribution points
  142. .TP
  143. s3cmd \fBcfinfo\fR \fI[cf://DIST_ID]\fR
  144. Display CloudFront distribution point parameters
  145. .TP
  146. s3cmd \fBcfcreate\fR \fIs3://BUCKET\fR
  147. Create CloudFront distribution point
  148. .TP
  149. s3cmd \fBcfdelete\fR \fIcf://DIST_ID\fR
  150. Delete CloudFront distribution point
  151. .TP
  152. s3cmd \fBcfmodify\fR \fIcf://DIST_ID\fR
  153. Change CloudFront distribution point parameters
  154. .TP
  155. s3cmd \fBcfinvalinfo\fR \fIcf://DIST_ID[/INVAL_ID]\fR
  156. Display CloudFront invalidation request(s) status
  157. .SH OPTIONS
  158. .PP
  159. Some of the below specified options can have their default
  160. values set in
  161. .B s3cmd
  162. config file (by default $HOME/.s3cmd). As it's a simple text file
  163. feel free to open it with your favorite text editor and do any
  164. changes you like.
  165. .TP
  166. \fB\-h\fR, \fB\-\-help\fR
  167. show this help message and exit
  168. .TP
  169. \fB\-\-configure\fR
  170. Invoke interactive (re)configuration tool. Optionally
  171. use as '\fB\-\-configure\fR s3://some\-bucket' to test access
  172. to a specific bucket instead of attempting to list
  173. them all.
  174. .TP
  175. \fB\-c\fR FILE, \fB\-\-config\fR=FILE
  176. Config file name. Defaults to $HOME/.s3cfg
  177. .TP
  178. \fB\-\-dump\-config\fR
  179. Dump current configuration after parsing config files
  180. and command line options and exit.
  181. .TP
  182. \fB\-\-access_key\fR=ACCESS_KEY
  183. AWS Access Key
  184. .TP
  185. \fB\-\-secret_key\fR=SECRET_KEY
  186. AWS Secret Key
  187. .TP
  188. \fB\-\-access_token\fR=ACCESS_TOKEN
  189. AWS Access Token
  190. .TP
  191. \fB\-n\fR, \fB\-\-dry\-run\fR
  192. Only show what should be uploaded or downloaded but
  193. don't actually do it. May still perform S3 requests to
  194. get bucket listings and other information though (only
  195. for file transfer commands)
  196. .TP
  197. \fB\-s\fR, \fB\-\-ssl\fR
  198. Use HTTPS connection when communicating with S3.
  199. (default)
  200. .TP
  201. \fB\-\-no\-ssl\fR
  202. Don't use HTTPS.
  203. .TP
  204. \fB\-e\fR, \fB\-\-encrypt\fR
  205. Encrypt files before uploading to S3.
  206. .TP
  207. \fB\-\-no\-encrypt\fR
  208. Don't encrypt files.
  209. .TP
  210. \fB\-f\fR, \fB\-\-force\fR
  211. Force overwrite and other dangerous operations.
  212. .TP
  213. \fB\-\-continue\fR
  214. Continue getting a partially downloaded file (only for
  215. [get] command).
  216. .TP
  217. \fB\-\-continue\-put\fR
  218. Continue uploading partially uploaded files or
  219. multipart upload parts. Restarts parts/files that
  220. don't have matching size and md5. Skips files/parts
  221. that do. Note: md5sum checks are not always
  222. sufficient to check (part) file equality. Enable this
  223. at your own risk.
  224. .TP
  225. \fB\-\-upload\-id\fR=UPLOAD_ID
  226. UploadId for Multipart Upload, in case you want
  227. continue an existing upload (equivalent to \fB\-\-continue\-\fR
  228. put) and there are multiple partial uploads. Use
  229. s3cmd multipart [URI] to see what UploadIds are
  230. associated with the given URI.
  231. .TP
  232. \fB\-\-skip\-existing\fR
  233. Skip over files that exist at the destination (only
  234. for [get] and [sync] commands).
  235. .TP
  236. \fB\-r\fR, \fB\-\-recursive\fR
  237. Recursive upload, download or removal.
  238. .TP
  239. \fB\-\-check\-md5\fR
  240. Check MD5 sums when comparing files for [sync].
  241. (default)
  242. .TP
  243. \fB\-\-no\-check\-md5\fR
  244. Do not check MD5 sums when comparing files for [sync].
  245. Only size will be compared. May significantly speed up
  246. transfer but may also miss some changed files.
  247. .TP
  248. \fB\-P\fR, \fB\-\-acl\-public\fR
  249. Store objects with ACL allowing read for anyone.
  250. .TP
  251. \fB\-\-acl\-private\fR
  252. Store objects with default ACL allowing access for you
  253. only.
  254. .TP
  255. \fB\-\-acl\-grant\fR=PERMISSION:EMAIL or USER_CANONICAL_ID
  256. Grant stated permission to a given amazon user.
  257. Permission is one of: read, write, read_acp,
  258. write_acp, full_control, all
  259. .TP
  260. \fB\-\-acl\-revoke\fR=PERMISSION:USER_CANONICAL_ID
  261. Revoke stated permission for a given amazon user.
  262. Permission is one of: read, write, read_acp,
  263. write_acp, full_control, all
  264. .TP
  265. \fB\-D\fR NUM, \fB\-\-restore\-days\fR=NUM
  266. Number of days to keep restored file available (only
  267. for 'restore' command). Default is 1 day.
  268. .TP
  269. \fB\-\-restore\-priority\fR=RESTORE_PRIORITY
  270. Priority for restoring files from S3 Glacier (only for
  271. 'restore' command). Choices available: bulk, standard,
  272. expedited
  273. .TP
  274. \fB\-\-delete\-removed\fR
  275. Delete destination objects with no corresponding
  276. source file [sync]
  277. .TP
  278. \fB\-\-no\-delete\-removed\fR
  279. Don't delete destination objects [sync]
  280. .TP
  281. \fB\-\-delete\-after\fR
  282. Perform deletes AFTER new uploads when delete-removed
  283. is enabled [sync]
  284. .TP
  285. \fB\-\-delay\-updates\fR
  286. *OBSOLETE* Put all updated files into place at end
  287. [sync]
  288. .TP
  289. \fB\-\-max\-delete\fR=NUM
  290. Do not delete more than NUM files. [del] and [sync]
  291. .TP
  292. \fB\-\-limit\fR=NUM
  293. Limit number of objects returned in the response body
  294. (only for [ls] and [la] commands)
  295. .TP
  296. \fB\-\-add\-destination\fR=ADDITIONAL_DESTINATIONS
  297. Additional destination for parallel uploads, in
  298. addition to last arg. May be repeated.
  299. .TP
  300. \fB\-\-delete\-after\-fetch\fR
  301. Delete remote objects after fetching to local file
  302. (only for [get] and [sync] commands).
  303. .TP
  304. \fB\-p\fR, \fB\-\-preserve\fR
  305. Preserve filesystem attributes (mode, ownership,
  306. timestamps). Default for [sync] command.
  307. .TP
  308. \fB\-\-no\-preserve\fR
  309. Don't store FS attributes
  310. .TP
  311. \fB\-\-exclude\fR=GLOB
  312. Filenames and paths matching GLOB will be excluded
  313. from sync
  314. .TP
  315. \fB\-\-exclude\-from\fR=FILE
  316. Read --exclude GLOBs from FILE
  317. .TP
  318. \fB\-\-rexclude\fR=REGEXP
  319. Filenames and paths matching REGEXP (regular
  320. expression) will be excluded from sync
  321. .TP
  322. \fB\-\-rexclude\-from\fR=FILE
  323. Read --rexclude REGEXPs from FILE
  324. .TP
  325. \fB\-\-include\fR=GLOB
  326. Filenames and paths matching GLOB will be included
  327. even if previously excluded by one of
  328. \fB\-\-(r)exclude(\-from)\fR patterns
  329. .TP
  330. \fB\-\-include\-from\fR=FILE
  331. Read --include GLOBs from FILE
  332. .TP
  333. \fB\-\-rinclude\fR=REGEXP
  334. Same as --include but uses REGEXP (regular expression)
  335. instead of GLOB
  336. .TP
  337. \fB\-\-rinclude\-from\fR=FILE
  338. Read --rinclude REGEXPs from FILE
  339. .TP
  340. \fB\-\-files\-from\fR=FILE
  341. Read list of source-file names from FILE. Use - to
  342. read from stdin.
  343. .TP
  344. \fB\-\-region\fR=REGION, \fB\-\-bucket\-location\fR=REGION
  345. Region to create bucket in. As of now the regions are:
  346. us\-east\-1, us\-west\-1, us\-west\-2, eu\-west\-1, eu\-
  347. central\-1, ap\-northeast\-1, ap\-southeast\-1, ap\-
  348. southeast\-2, sa\-east\-1
  349. .TP
  350. \fB\-\-host\fR=HOSTNAME
  351. HOSTNAME:PORT for S3 endpoint (default:
  352. s3.amazonaws.com, alternatives such as s3\-eu\-
  353. west\-1.amazonaws.com). You should also set \fB\-\-host\-\fR
  354. bucket.
  355. .TP
  356. \fB\-\-host\-bucket\fR=HOST_BUCKET
  357. DNS\-style bucket+hostname:port template for accessing
  358. a bucket (default: %(bucket)s.s3.amazonaws.com)
  359. .TP
  360. \fB\-\-reduced\-redundancy\fR, \fB\-\-rr\fR
  361. Store object with 'Reduced redundancy'. Lower per\-GB
  362. price. [put, cp, mv]
  363. .TP
  364. \fB\-\-no\-reduced\-redundancy\fR, \fB\-\-no\-rr\fR
  365. Store object without 'Reduced redundancy'. Higher per\-
  366. GB price. [put, cp, mv]
  367. .TP
  368. \fB\-\-storage\-class\fR=CLASS
  369. Store object with specified CLASS (STANDARD,
  370. STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER
  371. or DEEP_ARCHIVE). [put, cp, mv]
  372. .TP
  373. \fB\-\-access\-logging\-target\-prefix\fR=LOG_TARGET_PREFIX
  374. Target prefix for access logs (S3 URI) (for [cfmodify]
  375. and [accesslog] commands)
  376. .TP
  377. \fB\-\-no\-access\-logging\fR
  378. Disable access logging (for [cfmodify] and [accesslog]
  379. commands)
  380. .TP
  381. \fB\-\-default\-mime\-type\fR=DEFAULT_MIME_TYPE
  382. Default MIME\-type for stored objects. Application
  383. default is binary/octet\-stream.
  384. .TP
  385. \fB\-M\fR, \fB\-\-guess\-mime\-type\fR
  386. Guess MIME\-type of files by their extension or mime
  387. magic. Fall back to default MIME\-Type as specified by
  388. \fB\-\-default\-mime\-type\fR option
  389. .TP
  390. \fB\-\-no\-guess\-mime\-type\fR
  391. Don't guess MIME-type and use the default type
  392. instead.
  393. .TP
  394. \fB\-\-no\-mime\-magic\fR
  395. Don't use mime magic when guessing MIME-type.
  396. .TP
  397. \fB\-m\fR MIME/TYPE, \fB\-\-mime\-type\fR=MIME/TYPE
  398. Force MIME\-type. Override both \fB\-\-default\-mime\-type\fR and
  399. \fB\-\-guess\-mime\-type\fR.
  400. .TP
  401. \fB\-\-add\-header\fR=NAME:VALUE
  402. Add a given HTTP header to the upload request. Can be
  403. used multiple times. For instance set 'Expires' or
  404. \&'Cache\-Control' headers (or both) using this option.
  405. .TP
  406. \fB\-\-remove\-header\fR=NAME
  407. Remove a given HTTP header. Can be used multiple
  408. times. For instance, remove 'Expires' or 'Cache\-
  409. Control' headers (or both) using this option. [modify]
  410. .TP
  411. \fB\-\-server\-side\-encryption\fR
  412. Specifies that server\-side encryption will be used
  413. when putting objects. [put, sync, cp, modify]
  414. .TP
  415. \fB\-\-server\-side\-encryption\-kms\-id\fR=KMS_KEY
  416. Specifies the key id used for server\-side encryption
  417. with AWS KMS\-Managed Keys (SSE\-KMS) when putting
  418. objects. [put, sync, cp, modify]
  419. .TP
  420. \fB\-\-encoding\fR=ENCODING
  421. Override autodetected terminal and filesystem encoding
  422. (character set). Autodetected: UTF\-8
  423. .TP
  424. \fB\-\-add\-encoding\-exts\fR=EXTENSIONs
  425. Add encoding to these comma delimited extensions i.e.
  426. (css,js,html) when uploading to S3 )
  427. .TP
  428. \fB\-\-verbatim\fR
  429. Use the S3 name as given on the command line. No pre-
  430. processing, encoding, etc. Use with caution!
  431. .TP
  432. \fB\-\-disable\-multipart\fR
  433. Disable multipart upload on files bigger than
  434. \fB\-\-multipart\-chunk\-size\-mb\fR
  435. .TP
  436. \fB\-\-multipart\-chunk\-size\-mb\fR=SIZE
  437. Size of each chunk of a multipart upload. Files bigger
  438. than SIZE are automatically uploaded as multithreaded\-
  439. multipart, smaller files are uploaded using the
  440. traditional method. SIZE is in Mega\-Bytes, default
  441. chunk size is 15MB, minimum allowed chunk size is 5MB,
  442. maximum is 5GB.
  443. .TP
  444. \fB\-\-list\-md5\fR
  445. Include MD5 sums in bucket listings (only for 'ls'
  446. command).
  447. .TP
  448. \fB\-\-list\-allow\-unordered\fR
  449. Not an AWS standard. Allow the listing results to be
  450. returned in unsorted order. This may be faster when
  451. listing very large buckets.
  452. .TP
  453. \fB\-H\fR, \fB\-\-human\-readable\-sizes\fR
  454. Print sizes in human readable form (eg 1kB instead of
  455. 1234).
  456. .TP
  457. \fB\-\-ws\-index\fR=WEBSITE_INDEX
  458. Name of index\-document (only for [ws\-create] command)
  459. .TP
  460. \fB\-\-ws\-error\fR=WEBSITE_ERROR
  461. Name of error\-document (only for [ws\-create] command)
  462. .TP
  463. \fB\-\-expiry\-date\fR=EXPIRY_DATE
  464. Indicates when the expiration rule takes effect. (only
  465. for [expire] command)
  466. .TP
  467. \fB\-\-expiry\-days\fR=EXPIRY_DAYS
  468. Indicates the number of days after object creation the
  469. expiration rule takes effect. (only for [expire]
  470. command)
  471. .TP
  472. \fB\-\-expiry\-prefix\fR=EXPIRY_PREFIX
  473. Identifying one or more objects with the prefix to
  474. which the expiration rule applies. (only for [expire]
  475. command)
  476. .TP
  477. \fB\-\-progress\fR
  478. Display progress meter (default on TTY).
  479. .TP
  480. \fB\-\-no\-progress\fR
  481. Don't display progress meter (default on non-TTY).
  482. .TP
  483. \fB\-\-stats\fR
  484. Give some file-transfer stats.
  485. .TP
  486. \fB\-\-enable\fR
  487. Enable given CloudFront distribution (only for
  488. [cfmodify] command)
  489. .TP
  490. \fB\-\-disable\fR
  491. Disable given CloudFront distribution (only for
  492. [cfmodify] command)
  493. .TP
  494. \fB\-\-cf\-invalidate\fR
  495. Invalidate the uploaded filed in CloudFront. Also see
  496. [cfinval] command.
  497. .TP
  498. \fB\-\-cf\-invalidate\-default\-index\fR
  499. When using Custom Origin and S3 static website,
  500. invalidate the default index file.
  501. .TP
  502. \fB\-\-cf\-no\-invalidate\-default\-index\-root\fR
  503. When using Custom Origin and S3 static website, don't
  504. invalidate the path to the default index file.
  505. .TP
  506. \fB\-\-cf\-add\-cname\fR=CNAME
  507. Add given CNAME to a CloudFront distribution (only for
  508. [cfcreate] and [cfmodify] commands)
  509. .TP
  510. \fB\-\-cf\-remove\-cname\fR=CNAME
  511. Remove given CNAME from a CloudFront distribution
  512. (only for [cfmodify] command)
  513. .TP
  514. \fB\-\-cf\-comment\fR=COMMENT
  515. Set COMMENT for a given CloudFront distribution (only
  516. for [cfcreate] and [cfmodify] commands)
  517. .TP
  518. \fB\-\-cf\-default\-root\-object\fR=DEFAULT_ROOT_OBJECT
  519. Set the default root object to return when no object
  520. is specified in the URL. Use a relative path, i.e.
  521. default/index.html instead of /default/index.html or
  522. s3://bucket/default/index.html (only for [cfcreate]
  523. and [cfmodify] commands)
  524. .TP
  525. \fB\-v\fR, \fB\-\-verbose\fR
  526. Enable verbose output.
  527. .TP
  528. \fB\-d\fR, \fB\-\-debug\fR
  529. Enable debug output.
  530. .TP
  531. \fB\-\-version\fR
  532. Show s3cmd version (2.3.0) and exit.
  533. .TP
  534. \fB\-F\fR, \fB\-\-follow\-symlinks\fR
  535. Follow symbolic links as if they are regular files
  536. .TP
  537. \fB\-\-cache\-file\fR=FILE
  538. Cache FILE containing local source MD5 values
  539. .TP
  540. \fB\-q\fR, \fB\-\-quiet\fR
  541. Silence output on stdout
  542. .TP
  543. \fB\-\-ca\-certs\fR=CA_CERTS_FILE
  544. Path to SSL CA certificate FILE (instead of system
  545. default)
  546. .TP
  547. \fB\-\-ssl\-cert\fR=SSL_CLIENT_CERT_FILE
  548. Path to client own SSL certificate CRT_FILE
  549. .TP
  550. \fB\-\-ssl\-key\fR=SSL_CLIENT_KEY_FILE
  551. Path to client own SSL certificate private key
  552. KEY_FILE
  553. .TP
  554. \fB\-\-check\-certificate\fR
  555. Check SSL certificate validity
  556. .TP
  557. \fB\-\-no\-check\-certificate\fR
  558. Do not check SSL certificate validity
  559. .TP
  560. \fB\-\-check\-hostname\fR
  561. Check SSL certificate hostname validity
  562. .TP
  563. \fB\-\-no\-check\-hostname\fR
  564. Do not check SSL certificate hostname validity
  565. .TP
  566. \fB\-\-signature\-v2\fR
  567. Use AWS Signature version 2 instead of newer signature
  568. methods. Helpful for S3\-like systems that don't have
  569. AWS Signature v4 yet.
  570. .TP
  571. \fB\-\-limit\-rate\fR=LIMITRATE
  572. Limit the upload or download speed to amount bytes per
  573. second. Amount may be expressed in bytes, kilobytes
  574. with the k suffix, or megabytes with the m suffix
  575. .TP
  576. \fB\-\-no\-connection\-pooling\fR
  577. Disable connection re\-use
  578. .TP
  579. \fB\-\-requester\-pays\fR
  580. Set the REQUESTER PAYS flag for operations
  581. .TP
  582. \fB\-l\fR, \fB\-\-long\-listing\fR
  583. Produce long listing [ls]
  584. .TP
  585. \fB\-\-stop\-on\-error\fR
  586. stop if error in transfer
  587. .TP
  588. \fB\-\-content\-disposition\fR=CONTENT_DISPOSITION
  589. Provide a Content\-Disposition for signed URLs, e.g.,
  590. "inline; filename=myvideo.mp4"
  591. .TP
  592. \fB\-\-content\-type\fR=CONTENT_TYPE
  593. Provide a Content\-Type for signed URLs, e.g.,
  594. "video/mp4"
  595. .SH EXAMPLES
  596. One of the most powerful commands of \fIs3cmd\fR is \fBs3cmd sync\fR used for
  597. synchronising complete directory trees to or from remote S3 storage. To some extent
  598. \fBs3cmd put\fR and \fBs3cmd get\fR share a similar behaviour with \fBsync\fR.
  599. .PP
  600. Basic usage common in backup scenarios is as simple as:
  601. .nf
  602. s3cmd sync /local/path/ s3://test\-bucket/backup/
  603. .fi
  604. .PP
  605. This command will find all files under /local/path directory and copy them
  606. to corresponding paths under s3://test\-bucket/backup on the remote side.
  607. For example:
  608. .nf
  609. /local/path/\fBfile1.ext\fR \-> s3://bucket/backup/\fBfile1.ext\fR
  610. /local/path/\fBdir123/file2.bin\fR \-> s3://bucket/backup/\fBdir123/file2.bin\fR
  611. .fi
  612. .PP
  613. However if the local path doesn't end with a slash the last directory's name
  614. is used on the remote side as well. Compare these with the previous example:
  615. .nf
  616. s3cmd sync /local/path s3://test\-bucket/backup/
  617. .fi
  618. will sync:
  619. .nf
  620. /local/\fBpath/file1.ext\fR \-> s3://bucket/backup/\fBpath/file1.ext\fR
  621. /local/\fBpath/dir123/file2.bin\fR \-> s3://bucket/backup/\fBpath/dir123/file2.bin\fR
  622. .fi
  623. .PP
  624. To retrieve the files back from S3 use inverted syntax:
  625. .nf
  626. s3cmd sync s3://test\-bucket/backup/ ~/restore/
  627. .fi
  628. that will download files:
  629. .nf
  630. s3://bucket/backup/\fBfile1.ext\fR \-> ~/restore/\fBfile1.ext\fR
  631. s3://bucket/backup/\fBdir123/file2.bin\fR \-> ~/restore/\fBdir123/file2.bin\fR
  632. .fi
  633. .PP
  634. Without the trailing slash on source the behaviour is similar to
  635. what has been demonstrated with upload:
  636. .nf
  637. s3cmd sync s3://test\-bucket/backup ~/restore/
  638. .fi
  639. will download the files as:
  640. .nf
  641. s3://bucket/\fBbackup/file1.ext\fR \-> ~/restore/\fBbackup/file1.ext\fR
  642. s3://bucket/\fBbackup/dir123/file2.bin\fR \-> ~/restore/\fBbackup/dir123/file2.bin\fR
  643. .fi
  644. .PP
  645. All source file names, the bold ones above, are matched against \fBexclude\fR
  646. rules and those that match are then re\-checked against \fBinclude\fR rules to see
  647. whether they should be excluded or kept in the source list.
  648. .PP
  649. For the purpose of \fB\-\-exclude\fR and \fB\-\-include\fR matching only the
  650. bold file names above are used. For instance only \fBpath/file1.ext\fR is tested
  651. against the patterns, not \fI/local/\fBpath/file1.ext\fR
  652. .PP
  653. Both \fB\-\-exclude\fR and \fB\-\-include\fR work with shell\-style wildcards (a.k.a. GLOB).
  654. For a greater flexibility s3cmd provides Regular\-expression versions of the two exclude options
  655. named \fB\-\-rexclude\fR and \fB\-\-rinclude\fR.
  656. The options with ...\fB\-from\fR suffix (eg \-\-rinclude\-from) expect a filename as
  657. an argument. Each line of such a file is treated as one pattern.
  658. .PP
  659. There is only one set of patterns built from all \fB\-\-(r)exclude(\-from)\fR options
  660. and similarly for include variant. Any file excluded with eg \-\-exclude can
  661. be put back with a pattern found in \-\-rinclude\-from list.
  662. .PP
  663. Run s3cmd with \fB\-\-dry\-run\fR to verify that your rules work as expected.
  664. Use together with \fB\-\-debug\fR get detailed information
  665. about matching file names against exclude and include rules.
  666. .PP
  667. For example to exclude all files with ".jpg" extension except those beginning with a number use:
  668. .PP
  669. \-\-exclude '*.jpg' \-\-rinclude '[0\-9].*\.jpg'
  670. .PP
  671. To exclude all files except "*.jpg" extension, use:
  672. .PP
  673. \-\-exclude '*' \-\-include '*.jpg'
  674. .PP
  675. To exclude local directory 'somedir', be sure to use a trailing forward slash, as such:
  676. .PP
  677. \-\-exclude 'somedir/'
  678. .PP
  679. .SH SEE ALSO
  680. For the most up to date list of options run:
  681. .B s3cmd \-\-help
  682. .br
  683. For more info about usage, examples and other related info visit project homepage at:
  684. .B http://s3tools.org
  685. .SH AUTHOR
  686. Written by Michal Ludvig and contributors
  687. .SH CONTACT, SUPPORT
  688. Preferred way to get support is our mailing list:
  689. .br
  690. .I s3tools\-general@lists.sourceforge.net
  691. .br
  692. or visit the project homepage:
  693. .br
  694. .B http://s3tools.org
  695. .SH REPORTING BUGS
  696. Report bugs to
  697. .I s3tools\-bugs@lists.sourceforge.net
  698. .SH COPYRIGHT
  699. Copyright \(co 2007\-2015 TGRMN Software \- http://www.tgrmn.com \- and contributors
  700. .br
  701. .SH LICENSE
  702. This program is free software; you can redistribute it and/or modify
  703. it under the terms of the GNU General Public License as published by
  704. the Free Software Foundation; either version 2 of the License, or
  705. (at your option) any later version.
  706. This program is distributed in the hope that it will be useful,
  707. but WITHOUT ANY WARRANTY; without even the implied warranty of
  708. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  709. GNU General Public License for more details.
  710. .br