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, data sync status. Required for ``mdlog trim``,
310 ``replica mdlog get/delete``, ``replica datalog get/delete``.
312 .. option:: --max-entries=<entries>
314 Optional for listing operations to specify the max entires
316 .. option:: --auth-uid=auid
320 .. option:: --purge-data
322 Remove user data before user removal.
324 .. option:: --purge-keys
326 When specified, subuser removal will also purge all the subuser keys.
328 .. option:: --purge-objects
330 Remove all objects before bucket removal.
332 .. option:: --metadata-key=<key>
334 Key to retrieve metadata from with ``metadata get``.
336 .. option:: --rgw-region=<region>
338 Region in which radosgw is running.
340 .. option:: --rgw-zone=<zone>
342 Zone in which radosgw is running.
346 Besides checking bucket index, will also fix it.
348 .. option:: --check-objects
350 bucket check: Rebuilds bucket index according to actual objects state.
352 .. option:: --format=<format>
354 Specify output format for certain operations: xml, json.
356 .. option:: --sync-stats
358 Option to 'user stats', update user stats with current stats reported by
359 user's buckets indexes.
361 .. option:: --show-log-entries=<flag>
363 Enable/disable dump of log entries on log show.
365 .. option:: --show-log-sum=<flag>
367 Enable/disable dump of log summation on log show.
369 .. option:: --skip-zero-entries
371 Log show only dumps entries that don't have zero value in one of the numeric
376 Specify a file to read in when setting data.
378 .. option:: --state=<state string>
380 Specify a state for the opstate set command.
382 .. option:: --replica-log-type
384 Replica log type (metadata, data, bucket), required for replica log
387 .. option:: --categories=<list>
389 Comma separated list of categories, used in usage show.
391 .. option:: --caps=<caps>
393 List of caps (e.g., "usage=read, write; user=read".
395 .. option:: --compression=<compression-algorithm>
397 Placement target compression algorithm (lz4|snappy|zlib|zstd)
399 .. option:: --yes-i-really-mean-it
401 Required for certain operations.
407 .. option:: --max-objects
409 Specify max objects (negative value to disable).
411 .. option:: --max-size
413 Specify max size (in bytes, negative value to disable).
415 .. option:: --quota-scope
417 Scope of quota (bucket, user).
420 Orphans Search Options
421 ======================
425 Data pool to scan for leaked rados objects
427 .. option:: --num-shards
429 Number of shards to use for keeping the temporary scan info
431 .. option:: --orphan-stale-secs
433 Number of seconds to wait before declaring an object to be an orphan.
434 Default is 86400 (24 hours).
438 Set the job id (for orphans find)
440 .. option:: --max-concurrent-ios
442 Maximum concurrent ios for orphans find.
449 Generate a new user::
451 $ radosgw-admin user create --display-name="johnny rotten" --uid=johnny
452 { "user_id": "johnny",
454 "display_name": "johnny rotten",
460 "access_key": "TCICW53D9BQ2VGC46I44",
461 "secret_key": "tfm9aHMI8X76L3UdgE+ZQaJag1vJQmE6HDb5Lbrz"}],
466 $ radosgw-admin user rm --uid=johnny
468 Remove a user and all associated buckets with their contents::
470 $ radosgw-admin user rm --uid=johnny --purge-data
474 $ radosgw-admin bucket rm --bucket=foo
476 Link bucket to specified user::
478 $ radosgw-admin bucket link --bucket=foo --bucket_id=<bucket id> --uid=johnny
480 Unlink bucket from specified user::
482 $ radosgw-admin bucket unlink --bucket=foo --uid=johnny
484 Show the logs of a bucket from April 1st, 2012::
486 $ radosgw-admin log show --bucket=foo --date=2012-04-01-01 --bucket-id=default.14193.1
488 Show usage information for user from March 1st to (but not including) April 1st, 2012::
490 $ radosgw-admin usage show --uid=johnny \
491 --start-date=2012-03-01 --end-date=2012-04-01
493 Show only summary of usage information for all users::
495 $ radosgw-admin usage show --show-log-entries=false
497 Trim usage information for user until March 1st, 2012::
499 $ radosgw-admin usage trim --uid=johnny --end-date=2012-04-01
505 :program:`radosgw-admin` is part of Ceph, a massively scalable, open-source,
506 distributed storage system. Please refer to the Ceph documentation at
507 http://ceph.com/docs for more information.
513 :doc:`ceph <ceph>`\(8)
514 :doc:`radosgw <radosgw>`\(8)