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.
134 :command:`sync error list`
137 :command:`sync error trim`
141 Add an existing pool for data placement.
144 Remove an existing pool from data placement set.
146 :command:`pools list`
147 List placement active set.
150 Display bucket/object policy.
156 Dump a log from specific object or (bucket + date + bucket-id).
157 (NOTE: required to specify formatting of date to "YYYY-MM-DD-hh")
162 :command:`usage show`
163 Show the usage information (with optional user and date range).
165 :command:`usage trim`
166 Trim usage information (with optional user and date range).
169 Dump expired garbage collection objects (specify --include-all to list all
170 entries, including unexpired).
172 :command:`gc process`
173 Manually process garbage.
175 :command:`metadata get`
178 :command:`metadata put`
181 :command:`metadata rm`
182 Remove metadata info.
184 :command:`metadata list`
187 :command:`mdlog list`
190 :command:`mdlog trim`
193 :command:`bilog list`
194 List bucket index log.
196 :command:`bilog trim`
197 Trim bucket index log (use start-marker, end-marker).
199 :command:`datalog list`
202 :command:`datalog trim`
205 :command:`opstate list`
206 List stateful operations entries (use client_id, op_id, object).
208 :command:`opstate set`
209 Set state on an entry (use client_id, op_id, object, state).
211 :command:`opstate renew`
212 Renew state on an entry (use client_id, op_id, object).
214 :command:`opstate rm`
215 Remove entry (use client_id, op_id, object).
217 :command:`replicalog get`
218 Get replica metadata log entry.
220 :command:`replicalog delete`
221 Delete replica metadata log entry.
223 :command:`orphans find`
224 Init and run search for leaked rados objects
226 :command:`orphans finish`
227 Clean up search for leaked rados objects
233 .. option:: -c ceph.conf, --conf=ceph.conf
235 Use ``ceph.conf`` configuration file instead of the default
236 ``/etc/ceph/ceph.conf`` to determine monitor addresses during
239 .. option:: -m monaddress[:port]
241 Connect to specified monitor (instead of looking through ceph.conf).
243 .. option:: --uid=uid
247 .. option:: --subuser=<name>
251 .. option:: --email=email
253 The e-mail address of the user.
255 .. option:: --display-name=name
257 Configure the display name of the user.
259 .. option:: --access-key=<key>
263 .. option:: --gen-access-key
265 Generate random access key (for S3).
267 .. option:: --secret=secret
269 The secret associated with a given key.
271 .. option:: --gen-secret
273 Generate random secret key.
275 .. option:: --key-type=<type>
277 key type, options are: swift, s3.
279 .. option:: --temp-url-key[-2]=<key>
285 Set the system flag on the user.
287 .. option:: --bucket=bucket
289 Specify the bucket name.
291 .. option:: --object=object
293 Specify the object name.
295 .. option:: --date=yyyy-mm-dd
297 The date needed for some commands.
299 .. option:: --start-date=yyyy-mm-dd
301 The start date needed for some commands.
303 .. option:: --end-date=yyyy-mm-dd
305 The end date needed for some commands.
307 .. option:: --shard-id=<shard-id>
309 Optional for mdlog list. Required for ``mdlog trim``,
310 ``replica mdlog get/delete``, ``replica datalog get/delete``.
312 .. option:: --auth-uid=auid
316 .. option:: --purge-data
318 Remove user data before user removal.
320 .. option:: --purge-keys
322 When specified, subuser removal will also purge all the subuser keys.
324 .. option:: --purge-objects
326 Remove all objects before bucket removal.
328 .. option:: --metadata-key=<key>
330 Key to retrieve metadata from with ``metadata get``.
332 .. option:: --rgw-region=<region>
334 Region in which radosgw is running.
336 .. option:: --rgw-zone=<zone>
338 Zone in which radosgw is running.
342 Besides checking bucket index, will also fix it.
344 .. option:: --check-objects
346 bucket check: Rebuilds bucket index according to actual objects state.
348 .. option:: --format=<format>
350 Specify output format for certain operations: xml, json.
352 .. option:: --sync-stats
354 Option to 'user stats', update user stats with current stats reported by
355 user's buckets indexes.
357 .. option:: --show-log-entries=<flag>
359 Enable/disable dump of log entries on log show.
361 .. option:: --show-log-sum=<flag>
363 Enable/disable dump of log summation on log show.
365 .. option:: --skip-zero-entries
367 Log show only dumps entries that don't have zero value in one of the numeric
372 Specify a file to read in when setting data.
374 .. option:: --state=<state string>
376 Specify a state for the opstate set command.
378 .. option:: --replica-log-type
380 Replica log type (metadata, data, bucket), required for replica log
383 .. option:: --categories=<list>
385 Comma separated list of categories, used in usage show.
387 .. option:: --caps=<caps>
389 List of caps (e.g., "usage=read, write; user=read".
391 .. option:: --compression=<compression-algorithm>
393 Placement target compression algorithm (lz4|snappy|zlib|zstd)
395 .. option:: --yes-i-really-mean-it
397 Required for certain operations.
403 .. option:: --max-objects
405 Specify max objects (negative value to disable).
407 .. option:: --max-size
409 Specify max size (in bytes, negative value to disable).
411 .. option:: --quota-scope
413 Scope of quota (bucket, user).
416 Orphans Search Options
417 ======================
421 Data pool to scan for leaked rados objects
423 .. option:: --num-shards
425 Number of shards to use for keeping the temporary scan info
427 .. option:: --orphan-stale-secs
429 Number of seconds to wait before declaring an object to be an orphan.
430 Default is 86400 (24 hours).
434 Set the job id (for orphans find)
436 .. option:: --max-concurrent-ios
438 Maximum concurrent ios for orphans find.
445 Generate a new user::
447 $ radosgw-admin user create --display-name="johnny rotten" --uid=johnny
448 { "user_id": "johnny",
450 "display_name": "johnny rotten",
456 "access_key": "TCICW53D9BQ2VGC46I44",
457 "secret_key": "tfm9aHMI8X76L3UdgE+ZQaJag1vJQmE6HDb5Lbrz"}],
462 $ radosgw-admin user rm --uid=johnny
464 Remove a user and all associated buckets with their contents::
466 $ radosgw-admin user rm --uid=johnny --purge-data
470 $ radosgw-admin bucket rm --bucket=foo
472 Link bucket to specified user::
474 $ radosgw-admin bucket link --bucket=foo --bucket_id=<bucket id> --uid=johnny
476 Unlink bucket from specified user::
478 $ radosgw-admin bucket unlink --bucket=foo --uid=johnny
480 Show the logs of a bucket from April 1st, 2012::
482 $ radosgw-admin log show --bucket=foo --date=2012-04-01-01 --bucket-id=default.14193.1
484 Show usage information for user from March 1st to (but not including) April 1st, 2012::
486 $ radosgw-admin usage show --uid=johnny \
487 --start-date=2012-03-01 --end-date=2012-04-01
489 Show only summary of usage information for all users::
491 $ radosgw-admin usage show --show-log-entries=false
493 Trim usage information for user until March 1st, 2012::
495 $ radosgw-admin usage trim --uid=johnny --end-date=2012-04-01
501 :program:`radosgw-admin` is part of Ceph, a massively scalable, open-source,
502 distributed storage system. Please refer to the Ceph documentation at
503 http://ceph.com/docs for more information.
509 :doc:`ceph <ceph>`\(8)
510 :doc:`radosgw <radosgw>`\(8)