Ozone CLI

Overview

The general way to invoke an Ozone shell command is as follows:

$ ozone sh <object> <action> [<params>]

where:

  • <object> is an Ozone object such as bucket, key, prefix, snapshot, user, token, or volume.

  • <action> is an action to perform with an object. For example, to create a volume, the action would be create.

  • [params] are additional parameters that some actions require.

For examples of how to use the CLI tool, refer to the Connect to Ozone via CLI article.

Bucket commands

These commands allow you to administer buckets within a volume.

Command Description

addacl

Adds ACLs to a bucket

clrquota

Clears bucket quota

create

Creates a new bucket

delete

Deletes a bucket

getacl

Returns all ACLs from a bucket

info

Prints information about a bucket

link

Creates a symlink between buckets

list

Prints information about all buckets in a volume

removeacl

Removes ACLs from a bucket

set-replication-config

Sets replication configuration for a bucket

setacl

Overwrites bucket’s ACLs

setquota

Sets quotas for an existing bucket

update

Updates the owner of a bucket

Key commands

These commands allow you to administer keys within a bucket.

Command Description

addacl

Adds ACLs to a key

cat

Prints contents of a specific Ozone key to standard output

checksum

Returns checksum information of a key

cp

Copies an existing key to another one within the same bucket

delete

Deletes a key

get

Downloads contents of a key from a server

getacl

Lists all ACLs for a given key

info

Prints information about a key

list

Lists information about all keys in a given volume, bucket, or snapshot

put

Adds a key with file contents to a bucket

removeacl

Removes an access control list from a key

rename

Renames an existing key

setacl

Sets one or more ACLs, replacing the existing ones

Prefix commands

These commands allow you to manage prefix access settings.

Command Description

addacl

Adds an access control list for a prefix

getacl

Lists all ACLs for a given prefix

removeacl

Removes an access control list from a prefix

setacl

Sets one or more ACLs, replacing the existing ones

Snapshot commands

These commands allow you to work with bucket snapshots.

Command Description

create

Creates a snapshot of a bucket

delete

Deletes a snapshot of a bucket

diff

Returns a difference between two snapshots

info

Prints information about a bucket

list

Lists all snapshots of a bucket

listDiff

Lists the SnapshotDiff jobs for a bucket

Token commands

These commands allow you to administer delegation tokens.

Command Description

cancel

Cancels a delegation token

get

Issues a delegation token and saves it’s encoded version to a file

print

Prints information about a delegation token

renew

Renews a delegation token

User commands

These commands allow you to administer users.

Command Description

assign-admin

Assigns an admin role to an access ID

assign

Assigns a user to a tenant (organization)

get-secret

Returns a secret given to an access ID

info

Prints information about a user

list

Lists all users in a tenant

revoke-admin

Revokes admin privileges from a user

revoke

Removes a user from an organization (tenant)

set-secret

Sets a secret for an access ID

Volume commands

These commands allow you to administer volumes.

Command Description

addacl

Adds ACLs to a volume

clrquota

Clears volume quota

create

Creates a new volume

delete

Deletes a volume

getacl

Returns all ACLs from a volume

info

Prints information about a volume

list

Prints information about all volumes

removeacl

Removes ACLs from a volume

setacl

Overwrites volume’s ACLs

setquota

Sets quotas for an existing volume

update

Updates the owner of a volume

Found a mistake? Seleсt text and press Ctrl+Enter to report it