# Backing Up CockroachDB to Unified Data Vault

You can back up CockroachDB to Commvault Unified Data Vault, allowing you to leverage Commvault's secure, scalable storage while maintaining your existing backup workflows.

# Backing Up CockroachDB to Unified Data Vault

CockroachDB provides a BACKUP tool that workload administrators use to run backup and restore operations to AWS S3 or S3-compatible storage. With Commvault Unified Data Vault, you can replace your S3-compatible storage, keeping your backup scripts and standard operating procedures unchanged.

## Before You Begin

Ensure that your infrastructure administrator has created an S3 endpoint.

1. Create a Unified Data Vault.

2. Get Unified Data Vault Keys.

### Run CockroachDB Backup

Use the following command to back up CockroachDB to Unified Data Vault:

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

### List CockroachDB Backups

    SHOW BACKUPS IN 's3://{BUCKET_NAME}?AWS_ACCESS_KEY_ID={KEY_ID}&AWS_SECRET_ACCESS_KEY={SECRET_ACCESS_KEY}&AWS_ENDPOINT={ENDPOINT_URL}&AWS_USE_PATH_STYLE=true'

### Restore CockroachDB Backups

Use the following command to restore a CockroachDB database from 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>&AWS_USE_PATH_STYLE=true';

×

Loading...