Client Operations for S3 Clients

The following workloads are validated:

  • CockroachDB

  • Elasticsearch

  • MS SQL

The following S3 APIs are supported:

  • PutObject

  • ListObjects

  • GetObject

  • DeleteObject

  • HeadObject

  • HeadBucket

S3-putObject

AWS CLI put-object

You can upload an object to your S3 bucket using the Amazon S3 API.

aws --endpoint https://endpoint_FQDN:5005/S3 s3 cp source file s3://S3 Vault name key name
aws --endpoint https://endpoint_FQDN:5005/S3 s3api put-object --bucket S3 Vault name --key key name --body source file
where:
  • {endpoint_FQDN}:5005/S3: Specifies the endpoint URL of the S3-compatible storage.
  • {source file}: The local file that you want to upload to the S3 bucket.
  • {S3 Vault name}: The name of the target S3 bucket (or S3 Vault).
  • {key name}: The key (path) in the S3 bucket where the file will be stored.

Example Use Case: CockroachDB Backup

The S3 Vault can serve as a repository for storing your CockroachDB backups. To take a full backup of a cluster from the CockroachDB terminal:

    BACKUP INTO 's3://{BUCKET_NAME}?AWS_ACCESS_KEY_ID={KEY_ID}&AWS_SECRET_ACCESS_KEY={SECRET_ACCESS_KEY}&AWS_ENDPOINT={ENDPOINT_URL}'

For more information, see the Cockroach Labs documentation site, Backup page.

S3-listObjects

AWS CLI list-objects

You can browse the contents of your S3 bucket using the Amazon S3 API.

aws --endpoint-url https://endpoint_FQDN:5005/S3 s3api list-objects --bucket S3 Vault name --prefix prefix

where:

  • {endpoint_FQDN}:5005/S3: Specifies the endpoint URL of the S3-compatible storage.
  • {S3 Vault name}: The name of the S3 bucket (or S3 Vault) whose contents you want to list.
  • <prefix>: Filters the results to include only objects with keys that start with the specified prefix.

List Objects from Command Center

  1. From the Command Center navigation pane, go to Manage > Infrastructure.

    The Infrastructure page appears.

  2. Click the S3 Vault tile.

    The S3 Vault page appears.

  3. Click the S3 Vault that you want to browse.

    The S3 vault overview page appears.

  4. To view the contents of the S3 Vault, in the upper-right area of the page, click List objects.

S3-getObject

AWS CLI get-object

You can retrieve an object from your S3 bucket using the Amazon S3 API.

aws --endpoint https://endpoint_FQDN:5005/S3 s3 cp s3://S3 Vault name key name {output file}
aws --endpoint https://endpoint_FQDN:5005/S3 s3api get-object --bucket S3 Vault name --key key name {output file}
where:
  • {endpoint_FQDN}:5005/S3: Specifies the endpoint URL of the S3-compatible storage.
  • {S3 Vault name}: The name of the S3 bucket (or S3 Vault) where the object is stored.
  • {key name}: The key (path) of the object within the bucket that you want to retrieve.
  • {output file}: The local file name where the retrieved object will be saved.

Restore from Command Center

  1. From the Command Center navigation pane, go to Manage > Infrastructure.

    The Infrastructure page appears.

  2. Click the S3 Vault tile.

    The S3 Vault page appears.

  3. Click the S3 Vault that you want to browse.

    The S3 vault overview page appears.

  4. To view the contents of the S3 Vault, in the upper-right area of the page, click List objects.

    The Vault Content page appears.

  5. Select the objects to recover, and then click Recover.

    The Recover options dialog box appears.

  6. Click Submit.

Example Use Case: CockroachDB Restore

You can restore a CockroachDB database from an S3 Vault.

RESTORE DATABASE database_name FROM LATEST IN 's3://s3vault_name/folder?AWS_ACCESS_KEY_ID=key&AWS_SECRET_ACCESS_KEY=secret&AWS_ENDPOINT=endpoint_info';

where:

  • <database_name>: The name of the database you want to restore.
  • <s3vault_name>: The name of the S3 Vault where the backup is stored.
  • <folder>: The folder path within the S3 Vault where the backup is located.
  • <key>: The AWS access key ID used to authenticate access to the S3 Vault.
  • <secret>: The AWS secret access key used to authenticate access to the S3 Vault.
  • <endpoint_info>: The endpoint URL of the S3-compatible storage.

S3-deleteObject

AWS CLI delete-object

You can delete an object from your S3 bucket using the Amazon S3 API.

aws --endpoint-url https://endpoint_FQDN500/S3 s3api delete-object --bucket S3 Vault name --key key name

where:

  • {endpoint_FQDN}:5005/S3: Specifies the endpoint URL of the S3-compatible storage.
  • $[S3 Vault name]: The name of the S3 bucket (or S3 Vault) where the object is stored.
  • {key name}: The key (path) of the object within the bucket that you want to retrieve.

Supported APIs

The S3 Vault can be configured and managed using the following Commvault APIs APIs.

Operation API URL
Create instance of S3 Vault https://api.commvault.com/docs/SP38/api/cv/OpenAPI3/create-cvs-3-store/
Get S3 Vault Details https://api.commvault.com/docs/SP38/api/cv/OpenAPI3/get-cvs-3-store-details/
Register client as endpoint for S3 Vault https://api.commvault.com/docs/SP38/api/cv/OpenAPI3/create-s-3-endpoint/
Return S3 Vault telemetry https://api.commvault.com/docs/SP38/api/cv/OpenAPI3/post-cvs-3-telemetry/
Request enable status of S3 endpoint https://api.commvault.com/docs/SP38/api/cv/OpenAPI3/get-s-3-endpoint-state/
Enable S3 endpoint https://api.commvault.com/docs/SP38/api/cv/OpenAPI3/enable-s-3-endpoint/
Disable S3 endpoint https://api.commvault.com/docs/SP38/api/cv/OpenAPI3/disable-s-3-endpoint/
Get S3 access key https://api-next.commvault.com/docs/SP38/api/cv/OpenAPI3/get-s-3-access-key/
Rotate S3 access key https://api-next.commvault.com/docs/SP38/api/cv/OpenAPI3/rotate-s-3-access-key/
Get user S3 access key https://api-next.commvault.com/docs/SP38/api/cv/OpenAPI3/get-user-s-3-access-key/
Rotate user S3 access key https://api-next.commvault.com/docs/SP38/api/cv/OpenAPI3/rotate-user-s-3-access-key/
×

Loading...