radosgw-admin - rados REST gateway user administration utility
radosgw-admin command [ options ... ]
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:
- -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.
- --new-uid=uid
- ID of the new user. Used with 'user rename' command.
- --max-buckets
- max number of buckets for a user (0 for no limit, negative value to
disable bucket creation). Default is 1000.
- --access=<access>
- Set the access permissions for the sub-user. Available access permissions
are read, write, readwrite and full.
- --admin
- Set the admin flag on the user.
- --system
- Set the system flag on the user.
- --pool=<pool>
- Specify the pool name. Also used with orphans find as data pool to
scan for leaked rados objects.
- --purge-data
- When specified, user removal will also purge all the user data.
- --purge-keys
- When specified, subuser removal will also purge all the subuser keys.
- --purge-objects
- When specified, the bucket removal will also purge all objects in it.
- --commit
- Commit the period during 'period update'.
- --master-zone=<id>
- Master zone id.
- --default
- Set the entity (realm, zonegroup, zone) as default.
- --read-only
- Set the zone as read-only when adding to the zonegroup.
- --tags=<list>
- The list of tags for zonegroup placement add and modify commands.
- --tags-rm=<list>
- The list of tags to remove for zonegroup placement modify command.
- --bucket-index-max-shards
- Override a zone's or zonegroup's default number of bucket index shards.
This option is accepted by the 'zone create', 'zone modify', 'zonegroup
add', and 'zonegroup modify' commands, and applies to buckets that are
created after the zone/zonegroup changes take effect.
- --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. Supported formats: xml,
json.
- --sync-stats
- Option for 'user stats' command. When specified, it will update user stats
with the current stats reported by user's buckets indexes.
- --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.
- --caps=<caps>
- List of caps (e.g., "usage=read, write; user=read".
- --min-rewrite-stripe-size
- Specify the min stripe size for object rewrite (default 0). If the value
is set to 0, then the specified object will always be rewritten for
restriping.
- --warnings-only
- When specified with bucket limit check, list only buckets nearing or over
the current max objects per shard value.
- --bypass-gc
- When specified with bucket deletion, triggers object deletions by not
involving GC.
- --inconsistent-index
- When specified with bucket deletion and bypass-gc set to true, ignores
bucket index consistency.
- --max-concurrent-ios
- Maximum concurrent ios for bucket operations. Affects operations that scan
the bucket index, e.g., listing, deletion, and all scan/search operations
such as finding orphans or checking the bucket index. Default is 32.
- --max-size
- Specify max size (in B/K/M/G/T, negative value to disable).
- --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)
- Provide extra info in the job list.
- --path-prefix
- The path prefix for filtering the roles.
- --topic
- The bucket notifications/pubsub topic name.
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
Rename a user:
$ radosgw-admin user rename --uid=johny --new-uid=joe
Remove a user and all associated buckets with their contents:
$ radosgw-admin user rm --uid=johnny --purge-data
Remove a bucket:
$ radosgw-admin bucket rm --bucket=foo
Link bucket to specified user:
$ radosgw-admin bucket link --bucket=foo --bucket_id=<bucket id> --uid=johnny
Unlink bucket from specified user:
$ radosgw-admin bucket unlink --bucket=foo --uid=johnny
Rename a bucket:
$ radosgw-admin bucket link --bucket=foo --bucket-new-name=bar --uid=johnny
Move a bucket from the old global tenant space to a specified
tenant:
$ radosgw-admin bucket link --bucket=/foo --uid=12345678$12345678'
Link bucket to specified user and change object ACLs:
$ radosgw-admin bucket chown --bucket=/foo --uid=12345678$12345678'
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
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.
2010-2023, Inktank Storage, Inc. and contributors. Licensed under
Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)