radosgw-admin man page

radosgw-admin — rados REST gateway user administration utility

Synopsis

radosgw-admin command [ options ... ]

Description

radosgw-admin is a RADOS gateway user administration utility. It allows creating and modifying users.

Commands

radosgw-admin utility uses many commands for administration purpose which are as follows:

user create
Create a new user.
user modify
Modify a user.
user info
Display information of a user, and any potentially available subusers and keys.
user rm
Remove a user.
user suspend
Suspend a user.
user enable
Re-enable user after suspension.
user check
Check user info.
user stats
Show user stats as accounted by quota subsystem.
caps add
Add user capabilities.
caps rm
Remove user capabilities.
subuser create
Create a new subuser (primarily useful for clients using the Swift API).
subuser modify
Modify a subuser.
subuser rm
Remove a subuser.
key create
Create access key.
key rm
Remove access key.
bucket list
List all buckets.
bucket link
Link bucket to specified user.
bucket unlink
Unlink bucket from specified user.
bucket stats
Returns bucket statistics.
bucket rm
Remove a bucket.
bucket check
Check bucket index.
object rm
Remove an object.
object unlink
Unlink object from bucket index.
quota set
Set quota params.
quota enable
Enable quota.
quota disable
Disable quota.
region get
Show region info.
region list
List all regions set on this cluster.
region set
Set region info (requires infile).
region default
Set default region.
region-map get
Show region-map.
region-map set
Set region-map (requires infile).
zone get
Show zone cluster params.
zone set
Set zone cluster params (requires infile).
zone list
List all zones set on this cluster.
pool add
Add an existing pool for data placement.
pool rm
Remove an existing pool from data placement set.
pools list
List placement active set.
policy
Display bucket/object policy.
log list
List log objects.
log show
Dump a log from specific object or (bucket + date + bucket-id). (NOTE: required to specify formatting of date to "YYYY-MM-DD-hh")
log rm
Remove log object.
usage show
Show the usage information (with optional user and date range).
usage trim
Trim usage information (with optional user and date range).
gc list
Dump expired garbage collection objects (specify --include-all to list all entries, including unexpired).
gc process
Manually process garbage.
metadata get
Get metadata info.
metadata put
Put metadata info.
metadata rm
Remove metadata info.
metadata list
List metadata info.
mdlog list
List metadata log.
mdlog trim
Trim metadata log.
bilog list
List bucket index log.
bilog trim
Trim bucket index log (use start-marker, end-marker).
datalog list
List data log.
datalog trim
Trim data log.
opstate list
List stateful operations entries (use client_id, op_id, object).
opstate set
Set state on an entry (use client_id, op_id, object, state).
opstate renew
Renew state on an entry (use client_id, op_id, object).
opstate rm
Remove entry (use client_id, op_id, object).
replicalog get
Get replica metadata log entry.
replicalog delete
Delete replica metadata log entry.
orphans find
Init and run search for leaked rados objects
orphans finish
Clean up search for leaked rados objects

Options

-c ceph.conf, --conf=ceph.conf
Use ceph.conf configuration file instead of the default /etc/ceph/ceph.conf to determine monitor addresses during startup.
-m monaddress[:port]
Connect to specified monitor (instead of looking through ceph.conf).
--uid=uid
The radosgw user ID.
--subuser=<name>
Name of the subuser.
--email=email
The e-mail address of the user.
--display-name=name
Configure the display name of the user.
--access-key=<key>
S3 access key.
--gen-access-key
Generate random access key (for S3).
--secret=secret
The secret associated with a given key.
--gen-secret
Generate random secret key.
--key-type=<type>
key type, options are: swift, S3.
--temp-url-key[-2]=<key>
Temporary url key.
--system
Set the system flag on the user.
--bucket=bucket
Specify the bucket name.
--object=object
Specify the object name.
--date=yyyy-mm-dd
The date needed for some commands.
--start-date=yyyy-mm-dd
The start date needed for some commands.
--end-date=yyyy-mm-dd
The end date needed for some commands.
--shard-id=<shard-id>
Optional for mdlog list. Required for mdlog trim, replica mdlog get/delete, replica datalog get/delete.
--auth-uid=auid
The librados auid.
--purge-data
Remove user data before user removal.
--purge-keys
When specified, subuser removal will also purge all the subuser keys.
--purge-objects
Remove all objects before bucket removal.
--metadata-key=<key>
Key to retrieve metadata from with metadata get.
--rgw-region=<region>
Region in which radosgw is running.
--rgw-zone=<zone>
Zone in which radosgw is running.
--fix
Besides checking bucket index, will also fix it.
--check-objects
bucket check: Rebuilds bucket index according to actual objects state.
--format=<format>
Specify output format for certain operations: xml, json.
--sync-stats
Option to 'user stats', update user stats with current stats reported by user's buckets indexes.
--show-log-entries=<flag>
Enable/disable dump of log entries on log show.
--show-log-sum=<flag>
Enable/disable dump of log summation on log show.
--skip-zero-entries
Log show only dumps entries that don't have zero value in one of the numeric field.
--infile
Specify a file to read in when setting data.
--state=<state string>
Specify a state for the opstate set command.
--replica-log-type
Replica log type (metadata, data, bucket), required for replica log operations.
--categories=<list>
Comma separated list of categories, used in usage show.
--caps=<caps>
List of caps (e.g., "usage=read, write; user=read".
--yes-i-really-mean-it
Required for certain operations.

Quota Options

--max-objects
Specify max objects (negative value to disable).
--max-size
Specify max size (in bytes, negative value to disable).
--quota-scope
Scope of quota (bucket, user).

Orphans Search Options

--pool
Data pool to scan for leaked rados objects
--num-shards
Number of shards to use for keeping the temporary scan info
--orphan-stale-secs
Number of seconds to wait before declaring an object to be an orphan. Default is 86400 (24 hours).
--job-id
Set the job id (for orphans find)
--max-concurrent-ios
Maximum concurrent ios for orphans find. Default is 32.

Examples

Generate a new user:

$ radosgw-admin user create --display-name="johnny rotten" --uid=johnny
{ "user_id": "johnny",
  "rados_uid": 0,
  "display_name": "johnny rotten",
  "email": "",
  "suspended": 0,
  "subusers": [],
  "keys": [
        { "user": "johnny",
          "access_key": "TCICW53D9BQ2VGC46I44",
          "secret_key": "tfm9aHMI8X76L3UdgE+ZQaJag1vJQmE6HDb5Lbrz"}],
  "swift_keys": []}

Remove a user:

$ radosgw-admin user rm --uid=johnny

Remove a user and all associated buckets with their contents:

$ radosgw-admin user rm --uid=johnny --purge-data

Remove a bucket:

$ radosgw-admin bucket unlink --bucket=foo

Show the logs of a bucket from April 1st, 2012:

$ radosgw-admin log show --bucket=foo --date=2012-04-01-01 --bucket-id=default.14193.1

Show usage information for user from March 1st to (but not including) April 1st, 2012:

$ radosgw-admin usage show --uid=johnny \
                --start-date=2012-03-01 --end-date=2012-04-01

Show only summary of usage information for all users:

$ radosgw-admin usage show --show-log-entries=false

Trim usage information for user until March 1st, 2012:

$ radosgw-admin usage trim --uid=johnny --end-date=2012-04-01

Availability

radosgw-admin is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at http://ceph.com/docs for more information.

See Also

ceph(8) radosgw(8)

Referenced By

radosgw(8).

Dec 08, 2016 dev Ceph