radosgw-admin is a RADOS gateway user administration utility. It allows creating and modifying users.
radosgw-admin utility uses many commands for administration purpose which are as follows:
Use ceph.conf configuration file instead of the default /etc/ceph/ceph.conf to determine monitor addresses during startup.
Connect to specified monitor (instead of looking through ceph.conf).
The radosgw user ID.
Name of the subuser.
The e-mail address of the user.
Configure the display name of the user.
S3 access key.
Generate random access key (for S3).
The secret associated with a given key.
Generate random secret key.
key type, options are: swift, S3.
Temporary url key.
Set the system flag on the user.
Specify the bucket name.
Specify the object name.
The date needed for some commands.
The start date needed for some commands.
The end date needed for some commands.
Optional for mdlog list. Required for mdlog trim, replica mdlog get/delete, replica datalog get/delete.
The librados auid.
Remove user data before user removal.
When specified, subuser removal will also purge all the subuser keys.
Remove all objects before bucket removal.
Defer removal of object tail.
Key to retrieve metadata from with metadata get.
Region in which radosgw is running.
Zone in which radosgw is running.
Besides checking bucket index, will also fix it.
bucket check: Rebuilds bucket index according to actual objects state.
Specify output format for certain operations: xml, json.
Option to ‘user stats’, update user stats with current stats reported by user’s buckets indexes.
Enable/disable dump of log entries on log show.
Enable/disable dump of log summation on log show.
Log show only dumps entries that don’t have zero value in one of the numeric field.
Specify a file to read in when setting data.
Specify a state for the opstate set command.
Replica log type (metadata, data, bucket), required for replica log operations.
Comma separated list of categories, used in usage show.
List of caps (e.g., “usage=read, write; user=read”.
Required for certain operations.
Specify max objects (negative value to disable).
Specify max size (in bytes, negative value to disable).
Scope of quota (bucket, user).
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
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
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.