Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export #16776

Closed
wants to merge 9 commits into from
Closed

export #16776

Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions TOC-tidb-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
- [GitHub Integration](/tidb-cloud/branch-github-integration.md)
- [Manage Spending Limit](/tidb-cloud/manage-serverless-spend-limit.md)
- [Back Up and Restore TiDB Serverless Data](/tidb-cloud/backup-and-restore-serverless.md)
- [Export from TiDB Serverless](/tidb-cloud/serverless-export.md)
shiyuhang0 marked this conversation as resolved.
Show resolved Hide resolved
- Manage TiDB Dedicated Clusters
- [Create a TiDB Dedicated Cluster](/tidb-cloud/create-tidb-cluster.md)
- Connect to Your TiDB Dedicated Cluster
Expand Down
106 changes: 106 additions & 0 deletions tidb-cloud/serverless-export.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
title: TiDB Serverless Export (Beta)
summary: Learn how to export from TiDB Serverless.
shiyuhang0 marked this conversation as resolved.
Show resolved Hide resolved
---

# TiDB Serverless Export (Beta)

TiDB Serverless Export (Beta) is a service that allows you to export data from a TiDB Serverless cluster to local or an external storage service. You can use the exported data for backup, migration, data analysis, or other purposes.

You can also export data with `mysqldump`, `TiDB Dumpling`, or other tools. However, TiDB Serverless Export provides a more convenient and efficient way to export data from a TiDB Serverless cluster. It brings the following benefits:
shiyuhang0 marked this conversation as resolved.
Show resolved Hide resolved

- Convenience: Export service provides a simple and easy-to-use way to export data from a TiDB Serverless cluster. You don't need additional tools or resources.
- Isolation: Export service uses separate computing resources, which is isolated from the computing resources used by your online services
- Consistency: Export service ensures the consistency of the exported data without locking, which will not affect your online services.
shiyuhang0 marked this conversation as resolved.
Show resolved Hide resolved

## Export to local

When you export to local, there are some limitations:

1. You can only export one table at a time.
2. The exported data will be expired after two days, please download the data in time.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it mean the exported data will be removed from the stashing area when it has been downloaded for two days?

Copy link
Member Author

@shiyuhang0 shiyuhang0 Apr 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will be removed from the stashing area after three days, but it will not be allowed to download after two days.

3. The exported data will be saved in the stashing area, which offers 250 GB storage space for each organization per region. If the storage space is full, you will not be able to export data to local.

> **Note:**
>
> We recommend you export to S3 or other supported storage services if you want to export a large amount of data.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"other supported storage services" looks unclear. Currently, besides S3, what storage services are supported for this feature?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only s3 is supported now, we will support GCS (Google cloud storage) and Azure Blob Storage next Q


<SimpleTab>

<div label="Export With CLI">

1. Export a specific table from a TiDB Serverless cluster to local.

```sh
ticloud serverless export create -c <cluster-id> --databsae <database> --table <table>
shiyuhang0 marked this conversation as resolved.
Show resolved Hide resolved
```

shiyuhang0 marked this conversation as resolved.
Show resolved Hide resolved
2. Download the exported data after the export is succeeded.

```sh
ticloud serverless export download -c <cluster-id> -e <export-id>
```

You can also use the cli with interactive mode.

```sh
ticloud serverless export create
```

</div>

<div label="Export On Console">

Not supported yet.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When is it planned? If it will not happen in the upcoming one or two months, can we remove this tab and tell users that currently they can only use this feature with the CLI?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be supported in the next quarter (before july)


</div>

</SimpleTab>

## Export to S3

You can export data directly to your own S3 bucket with the credentials.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any permissions required for S3? Do we need to indicate the permissions here and also provide the S3 doc link about how to configure the permissions?


<SimpleTab>

<div label="Export With CLI">

1. Export all data from a TiDB Serverless cluster to S3.

```sh
ticloud serverless export create -c <cluster-id> --bucket-uri <bucket-uri> --access-key-id <access-key-id> --secret-access-key <secret-access-key>
```
shiyuhang0 marked this conversation as resolved.
Show resolved Hide resolved

2. Export from a TiDB Serverless cluster to S3 with SQL file.

```sh
ticloud serverless export create -c <cluster-id> --bucket-uri <bucket-uri> --access-key-id <access-key-id> --secret-access-key <secret-access-key> --file-type SQL
```

shiyuhang0 marked this conversation as resolved.
Show resolved Hide resolved
You can also use the cli with interactive mode.

```sh
ticloud serverless export create
```

</div>

<div label="Export On Console">

Not supported yet.

</div>

</SimpleTab>

## Features
shiyuhang0 marked this conversation as resolved.
Show resolved Hide resolved

- Support exporting data to local and [Amazon S3](https://aws.amazon.com/s3/). Please Contact [TiDB Cloud Support](/tidb-cloud/tidb-cloud-support.md) if your want to export to other storage services.
- Support exporting a specific database or table.
- Support exporting as CSV or SQL format.

## Pricing

You will only be charged for a successful or canceled export.
shiyuhang0 marked this conversation as resolved.
Show resolved Hide resolved

The export service is free during the beta period. You only need to pay for the [Request Units (RUs)](/tidb-cloud/tidb-cloud-glossary.md#request-unit) generated during the export process.
Loading