1swift(1)                        OpenStack Swift                       swift(1)
2
3
4

NAME

6       swift - OpenStack Swift client tool
7
8

SYNOPSIS

10       swift [options] <command> [args]
11
12

DESCRIPTION

14       The  swift  tool  is  a  command line utility for communicating with an
15       OpenStack Object Storage (Swift) environment. It allows one to  perform
16       several types of operations.
17
18

COMMANDS

20       stat [command-options] [container] [object]
21           Displays  information for the account, container, or object depend‐
22           ing on the args given (if any).  In verbose mode, the  Storage  URL
23           and  the  authentication  token  are displayed as well. Option --lh
24           reports sizes in human readable format similar to ls -lh.
25
26       list [command-options] [container]
27           Lists the containers for the account or  the  objects  for  a  con‐
28           tainer.   The  -p  <prefix>  or --prefix <prefix> is an option that
29           will only list items beginning with that prefix. The -d <delim>  or
30           --delimiter  <delim>  is  option (for container listings only) that
31           will roll up items with the given delimiter  (see  OpenStack  Swift
32           general documentation for what this means).
33
34           The  -l  or --long and --lh options provide more detail, similar to
35           ls -l and ls -lh, the latter providing sizes in human readable for‐
36           mat (eg 3K, 12M, etc). These latter 2 switches use more overhead to
37           get those details, which is directly proportional to the number  of
38           container  or  objects  being listed. With the -t or --total option
39           they only report totals.
40
41       upload [command-options]  container  file_or_directory  [file_or_direc‐
42       tory] [...]
43           Uploads  to the given container the files and directories specified
44           by the remaining args. The -c or --changed is an option  that  will
45           only  upload  files  that  have  changed since the last upload. The
46           --object-name <object-name> is an option that will upload file  and
47           name object to <object-name> or upload dir and use <object-name> as
48           object prefix. If the file name is  "-",  reads  the  content  from
49           standard  input.  In  this  case,  --object-name is required and no
50           other files may be given. The -S <size>  or  --segment-size  <size>
51           and  --leave-segments  and  others  are  options as well (see swift
52           upload --help for more).
53
54       post [command-options] [container] [object]
55           Updates meta information for  the  account,  container,  or  object
56           depending on the args given. If the container is not found, it will
57           be created automatically; but this is not  true  for  accounts  and
58           objects.  Containers  also  allow the -r (or --read-acl) and -w (or
59           --write-acl) options. The -m or --meta option is allowed on all and
60           used  to  define  the  user  meta  data  items  to  set in the form
61           Name:Value. This option can be  repeated.   For  more  details  and
62           options  see  swift  post  --help.   Example: post -m Color:Blue -m
63           Size:Large
64
65       copy [command-options] container object
66           Copies an object to a new destination or adds user metadata to  the
67           object  (current  user metadata will be preserved, in contrast with
68           the post command) depending on the args  given.  The  --destination
69           option  sets  the destination in the form /container/object. If not
70           set, the object will be copied onto  itself  which  is  useful  for
71           adding  metadata.  The  -M  or  --fresh-metadata  option copies the
72           object without the existing user metadata. The -m or --meta  option
73           is  always allowed and is used to define the user metadata items to
74           set in the form Name:Value (this option can be repeated).  For more
75           details and options see swift copy --help.
76
77       download [command-options] [container] [object] [object] [...]
78           Downloads  everything in the account (with --all), or everything in
79           a container, or a list of objects depending on the args given.  For
80           a  single object download, you may use the -o [--output] <filename>
81           option to redirect the output to a specific file  or  if  "-"  then
82           just redirect to stdout or with --no-download actually not to write
83           anything to disk.  The --ignore-checksum is an  option  that  turns
84           off checksum validation.  You can specify optional headers with the
85           repeatable cURL-like option -H [--header].  For  more  details  and
86           options  see  swift  download  --help.   The  --ignore-mtime option
87           ignores the x-object-meta-mtime metadata entry on  the  object  (if
88           present)  and instead creates the downloaded files with fresh atime
89           and mtime values.
90
91       delete [command-options] [container] [object] [object] [...]
92           Deletes everything in the account (with --all), or everything in  a
93           container,  or  all  objects in a container that start with a given
94           string (given by --prefix), or a list of objects depending  on  the
95           args  given.  Segments of manifest objects will be deleted as well,
96           unless you specify the --leave-segments option.  For  more  details
97           and options see swift delete --help.
98
99       capabilities [command-options] [proxy-url]
100           Displays  cluster capabilities. If the proxy-url option is not pro‐
101           vided the storage-url retrieved after  authentication  is  used  as
102           proxy-url.
103
104           By  default,  the  output  includes the list of the activated Swift
105           middlewares as well as relevant options for each one.  Additionally
106           the command displays relevant options for the Swift core.
107
108           The  --json  option will print a json representation of the cluster
109           capabilities. This is typically more suitable  for  consumption  by
110           other programs, such as jq.
111
112           Example: capabilities https://swift.example.com
113                    capabilities --json
114
115       tempurl [command-option] method time path key
116           Generates  a  temporary  URL allowing unauthenticated access to the
117           Swift object at the given path, using the given  HTTP  method,  for
118           the given time, using the given TempURL key.
119
120           The  time can be specified either as an integer denoting the amount
121           of seconds the temporary URL is valid, or as an ISO 8601  timestamp
122           in  one  of  following  formats:   Complete  date:  YYYY-MM-DD  (eg
123           1997-07-16),  complete  date  plus  hours,  minutes  and   seconds:
124           YYYY-MM-DDThh:mm:ss  (eg 1997-07-16T19:20:30) or complete date plus
125           hours,    minutes    and    seconds    with     UTC     designator:
126           YYYY-MM-DDThh:mm:ssZ  (eg  1997-07-16T19:20:30Z).  Be aware that if
127           you do not use the latter format, the timestamp is generated  using
128           your  locale  timezone.  If the first format is used, the time part
129           used will equal to 00:00:00.
130
131           With the --prefix-based option a prefix-based URL is generated.
132
133           The option --iso8601 provides ISO 8601 UTC  timestamps  instead  of
134           Unix timestamps inside the generated URL.
135
136           If  optional  --absolute argument is provided and the time argument
137           is specified in seconds, the seconds  are  interpreted  as  a  Unix
138           timestamp at which the URL should expire.
139
140           Example:    tempurl    GET    $(date   -d   "Jan   1   2016"   +%s)
141           /v1/AUTH_foo/bar_container/quux.md my_secret_tempurl_key --absolute
142
143
144       auth
145           Display auth related authentication  variables  in  shell  friendly
146           format.  For examples see swift auth --help.
147
148

OPTIONS

150       --version              Show program's version number and exit
151       -h,  --help              Show this (or any subcommand if after command)
152       help message and exit
153       -s, --snet             Use SERVICENET internal network
154       -v, --verbose          Print more info
155       -q, --quiet            Suppress status output
156       -A AUTH, --auth=AUTH   URL for obtaining an auth token
157       -U USER, --user=USER   User name for obtaining an auth token
158       -V 1|2, --auth-version=VERSION  Authentication protocol version
159       -K KEY, --key=KEY      Key for obtaining an auth token
160       --os-storage-url=URL   Use this instead of URL returned from auth
161       --os-help              Show all OpenStack authentication options
162           For more options see swift --help and swift --os-help.
163
164
165

EXAMPLE

167       swift  -A  https://127.0.0.1:443/auth/v1.0  -U   swiftops:swiftops   -K
168       swiftops stat
169
170            Account: AUTH_43b42dae-dc0b-4a4b-ac55-97de614d6e6e
171         Containers: 1
172            Objects: 1
173              Bytes: 1124
174         Accept-Ranges: bytes
175         X-Trans-Id: txb21186a9eef64ed295a1e95896a0fc72
176
177
178

DOCUMENTATION

180       More  in  depth  documentation  about OpenStack Swift as a whole can be
181       found at https://docs.openstack.org/swift/latest/
182
183
184
185Linux                              8/26/2011                          swift(1)
Impressum