3 =================================================================
4 radosgw-admin -- rados REST gateway user administration utility
5 =================================================================
7 .. program:: radosgw-admin
12 | **radosgw-admin** *command* [ *options* *...* ]
18 :program:`radosgw-admin` is a RADOS gateway user administration utility. It
19 allows creating and modifying users.
25 :program:`radosgw-admin` utility uses many commands for administration purpose
28 :command:`user create`
31 :command:`user modify`
35 Display information of a user, and any potentially available
41 :command:`user suspend`
44 :command:`user enable`
45 Re-enable user after suspension.
51 Show user stats as accounted by quota subsystem.
54 Add user capabilities.
57 Remove user capabilities.
59 :command:`subuser create`
60 Create a new subuser (primarily useful for clients using the Swift API).
62 :command:`subuser modify`
74 :command:`bucket list`
77 :command:`bucket link`
78 Link bucket to specified user.
80 :command:`bucket unlink`
81 Unlink bucket from specified user.
83 :command:`bucket stats`
84 Returns bucket statistics.
89 :command:`bucket check`
95 :command:`object unlink`
96 Unlink object from bucket index.
101 :command:`quota enable`
104 :command:`quota disable`
107 :command:`region get`
110 :command:`region list`
111 List all regions set on this cluster.
113 :command:`region set`
114 Set region info (requires infile).
116 :command:`region default`
119 :command:`region-map get`
122 :command:`region-map set`
123 Set region-map (requires infile).
126 Show zone cluster params.
129 Set zone cluster params (requires infile).
132 List all zones set on this cluster.
135 Add an existing pool for data placement.
138 Remove an existing pool from data placement set.
140 :command:`pools list`
141 List placement active set.
144 Display bucket/object policy.
150 Dump a log from specific object or (bucket + date + bucket-id).
151 (NOTE: required to specify formatting of date to "YYYY-MM-DD-hh")
156 :command:`usage show`
157 Show the usage information (with optional user and date range).
159 :command:`usage trim`
160 Trim usage information (with optional user and date range).
163 Dump expired garbage collection objects (specify --include-all to list all
164 entries, including unexpired).
166 :command:`gc process`
167 Manually process garbage.
169 :command:`metadata get`
172 :command:`metadata put`
175 :command:`metadata rm`
176 Remove metadata info.
178 :command:`metadata list`
181 :command:`mdlog list`
184 :command:`mdlog trim`
187 :command:`bilog list`
188 List bucket index log.
190 :command:`bilog trim`
191 Trim bucket index log (use start-marker, end-marker).
193 :command:`datalog list`
196 :command:`datalog trim`
199 :command:`opstate list`
200 List stateful operations entries (use client_id, op_id, object).
202 :command:`opstate set`
203 Set state on an entry (use client_id, op_id, object, state).
205 :command:`opstate renew`
206 Renew state on an entry (use client_id, op_id, object).
208 :command:`opstate rm`
209 Remove entry (use client_id, op_id, object).
211 :command:`replicalog get`
212 Get replica metadata log entry.
214 :command:`replicalog delete`
215 Delete replica metadata log entry.
217 :command:`orphans find`
218 Init and run search for leaked rados objects
220 :command:`orphans finish`
221 Clean up search for leaked rados objects
227 .. option:: -c ceph.conf, --conf=ceph.conf
229 Use ``ceph.conf`` configuration file instead of the default
230 ``/etc/ceph/ceph.conf`` to determine monitor addresses during
233 .. option:: -m monaddress[:port]
235 Connect to specified monitor (instead of looking through ceph.conf).
237 .. option:: --uid=uid
241 .. option:: --subuser=<name>
245 .. option:: --email=email
247 The e-mail address of the user.
249 .. option:: --display-name=name
251 Configure the display name of the user.
253 .. option:: --access-key=<key>
257 .. option:: --gen-access-key
259 Generate random access key (for S3).
261 .. option:: --secret=secret
263 The secret associated with a given key.
265 .. option:: --gen-secret
267 Generate random secret key.
269 .. option:: --key-type=<type>
271 key type, options are: swift, s3.
273 .. option:: --temp-url-key[-2]=<key>
279 Set the system flag on the user.
281 .. option:: --bucket=bucket
283 Specify the bucket name.
285 .. option:: --object=object
287 Specify the object name.
289 .. option:: --date=yyyy-mm-dd
291 The date needed for some commands.
293 .. option:: --start-date=yyyy-mm-dd
295 The start date needed for some commands.
297 .. option:: --end-date=yyyy-mm-dd
299 The end date needed for some commands.
301 .. option:: --shard-id=<shard-id>
303 Optional for mdlog list. Required for ``mdlog trim``,
304 ``replica mdlog get/delete``, ``replica datalog get/delete``.
306 .. option:: --auth-uid=auid
310 .. option:: --purge-data
312 Remove user data before user removal.
314 .. option:: --purge-keys
316 When specified, subuser removal will also purge all the subuser keys.
318 .. option:: --purge-objects
320 Remove all objects before bucket removal.
322 .. option:: --metadata-key=<key>
324 Key to retrieve metadata from with ``metadata get``.
326 .. option:: --rgw-region=<region>
328 Region in which radosgw is running.
330 .. option:: --rgw-zone=<zone>
332 Zone in which radosgw is running.
336 Besides checking bucket index, will also fix it.
338 .. option:: --check-objects
340 bucket check: Rebuilds bucket index according to actual objects state.
342 .. option:: --format=<format>
344 Specify output format for certain operations: xml, json.
346 .. option:: --sync-stats
348 Option to 'user stats', update user stats with current stats reported by
349 user's buckets indexes.
351 .. option:: --show-log-entries=<flag>
353 Enable/disable dump of log entries on log show.
355 .. option:: --show-log-sum=<flag>
357 Enable/disable dump of log summation on log show.
359 .. option:: --skip-zero-entries
361 Log show only dumps entries that don't have zero value in one of the numeric
366 Specify a file to read in when setting data.
368 .. option:: --state=<state string>
370 Specify a state for the opstate set command.
372 .. option:: --replica-log-type
374 Replica log type (metadata, data, bucket), required for replica log
377 .. option:: --categories=<list>
379 Comma separated list of categories, used in usage show.
381 .. option:: --caps=<caps>
383 List of caps (e.g., "usage=read, write; user=read".
385 .. option:: --compression=<compression-algorithm>
387 Placement target compression algorithm (lz4|snappy|zlib|zstd)
389 .. option:: --yes-i-really-mean-it
391 Required for certain operations.
397 .. option:: --max-objects
399 Specify max objects (negative value to disable).
401 .. option:: --max-size
403 Specify max size (in bytes, negative value to disable).
405 .. option:: --quota-scope
407 Scope of quota (bucket, user).
410 Orphans Search Options
411 ======================
415 Data pool to scan for leaked rados objects
417 .. option:: --num-shards
419 Number of shards to use for keeping the temporary scan info
421 .. option:: --orphan-stale-secs
423 Number of seconds to wait before declaring an object to be an orphan.
424 Default is 86400 (24 hours).
428 Set the job id (for orphans find)
430 .. option:: --max-concurrent-ios
432 Maximum concurrent ios for orphans find.
439 Generate a new user::
441 $ radosgw-admin user create --display-name="johnny rotten" --uid=johnny
442 { "user_id": "johnny",
444 "display_name": "johnny rotten",
450 "access_key": "TCICW53D9BQ2VGC46I44",
451 "secret_key": "tfm9aHMI8X76L3UdgE+ZQaJag1vJQmE6HDb5Lbrz"}],
456 $ radosgw-admin user rm --uid=johnny
458 Remove a user and all associated buckets with their contents::
460 $ radosgw-admin user rm --uid=johnny --purge-data
464 $ radosgw-admin bucket rm --bucket=foo
466 Link bucket to specified user::
468 $ radosgw-admin bucket link --bucket=foo --bucket_id=<bucket id> --uid=johnny
470 Unlink bucket from specified user::
472 $ radosgw-admin bucket unlink --bucket=foo --uid=johnny
474 Show the logs of a bucket from April 1st, 2012::
476 $ radosgw-admin log show --bucket=foo --date=2012-04-01-01 --bucket-id=default.14193.1
478 Show usage information for user from March 1st to (but not including) April 1st, 2012::
480 $ radosgw-admin usage show --uid=johnny \
481 --start-date=2012-03-01 --end-date=2012-04-01
483 Show only summary of usage information for all users::
485 $ radosgw-admin usage show --show-log-entries=false
487 Trim usage information for user until March 1st, 2012::
489 $ radosgw-admin usage trim --uid=johnny --end-date=2012-04-01
495 :program:`radosgw-admin` is part of Ceph, a massively scalable, open-source,
496 distributed storage system. Please refer to the Ceph documentation at
497 http://ceph.com/docs for more information.
503 :doc:`ceph <ceph>`\(8)
504 :doc:`radosgw <radosgw>`\(8)