Client Operations for S3 Clients

The following S3 APIs are supported:

  • PutObject

  • CreateMultipartUpload

  • UploadPart

  • CompleteMultipartUpload

  • AbortMultipartUpload

  • ListObjects

  • ListObjectsV2

  • ListMultipartUploads

  • GetObject

  • DeleteObject

  • DeleteObjects

  • 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://$[Unified Data Vault name] $[key name]
aws --endpoint https://$[endpoint_FQDN]:5005/S3 s3api put-object --bucket $[Unified Data 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.
  • {Unified Data Vault name}: The name of the target S3 bucket (or Unified Data Vault).
  • {key name}: The key (path) in the S3 bucket where the file will be stored.

Example Use Case: CockroachDB Backup

The Unified Data 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 $[Unified Data Vault name] --prefix $[prefix] 

where:

  • {endpoint_FQDN}:5005/S3: Specifies the endpoint URL of the S3-compatible storage.
  • {Unified Data Vault name}: The name of the S3 bucket (or Unified Data 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 > Environment > Infrastructure.

    The Infrastructure page appears.

  2. Click the Unified Data Vault tile.

    The Unified Data Vault page appears.

  3. Click the Unified Data Vault that you want to browse.

    The Unified Data Vault overview page appears.

  4. To view the contents of the Unified Data 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://$[Unified Data Vault name] $[key name] {output file}
aws --endpoint https://$[endpoint_FQDN]:5005/S3 s3api get-object --bucket $[Unified Data Vault name] --key $[key name] {output file}
where:
  • {endpoint_FQDN}:5005/S3: Specifies the endpoint URL of the S3-compatible storage.
  • {Unified Data Vault name}: The name of the S3 bucket (or Unified Data 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 > Environment > Infrastructure.

    The Infrastructure page appears.

  2. Click the Unified Data Vault tile.

    The Unified Data Vault page appears.

  3. Click the Unified Data Vault that you want to browse.

    The Unified Data Vault overview page appears.

  4. To view the contents of the Unified Data 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 Unified Data 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 Unified Data Vault where the backup is stored.
  • <folder>: The folder path within the Unified Data Vault where the backup is located.
  • <key>: The AWS access key ID used to authenticate access to the Unified Data Vault.
  • <secret>: The AWS secret access key used to authenticate access to the Unified Data 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_FQDN]500/S3 s3api delete-object --bucket $[Unified Data Vault name] --key $[key name]

where:

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

Loading...