diff --git a/content/influxdb3/cloud-dedicated/admin/tables/delete.md b/content/influxdb3/cloud-dedicated/admin/tables/delete.md index 48b2d45c1..8e6015edd 100644 --- a/content/influxdb3/cloud-dedicated/admin/tables/delete.md +++ b/content/influxdb3/cloud-dedicated/admin/tables/delete.md @@ -12,6 +12,7 @@ list_code_example: | influxctl table delete ``` related: + - /influxdb3/cloud-dedicated/admin/tables/undelete/ - /influxdb3/cloud-dedicated/reference/cli/influxctl/table/delete/ --- @@ -19,8 +20,19 @@ Use the Admin UI or the [`influxctl table delete` command](/influxdb3/cloud-dedi to delete a table from a database in your {{< product-name omit=" Cluster" >}} cluster. > [!Warning] -> Deleting a table is irreversible. Once a table is deleted, all data stored in -> that table is permanently removed and cannot be recovered. +> #### Wait before writing to a new table with the same name +> +> After deleting a table from your {{% product-name omit=" Cluster" %}} +> cluster, you can reuse the name to create a new table, but **wait two to +> three minutes** after deleting the previous table before writing to the new +> table to allow write caches to clear. + +> [!Note] +> #### Deleted tables may be able to be restored +> +> Deleted tables may be able to be [restored](/influxdb3/cloud-dedicated/admin/tables/undelete/) +> within approximately 7 days of deletion, depending on when cleanup jobs run. +> After the cleanup job runs, the table and its data are permanently removed. Provide the following arguments: @@ -41,13 +53,10 @@ Replace the following: When prompted, enter `y` to confirm the deletion. {{% note %}} -#### Wait before reusing a deleted table name - -After deleting a table, wait a few minutes before attempting to create a new -table with the same name to ensure the deletion process has fully completed. +#### Pause writes before deleting a table {{% product-name %}} creates tables implicitly using table names specified in -line protocol written to the databases. To prevent the deleted table from being -immediately recreated by incoming write requests, pause all write requests to -the table before deleting it. +line protocol written to the databases. +To prevent the deleted table from being immediately recreated by incoming write requests, +pause all write requests to the table before deleting it. {{% /note %}} diff --git a/content/influxdb3/cloud-dedicated/admin/tables/undelete.md b/content/influxdb3/cloud-dedicated/admin/tables/undelete.md index c4e042d2e..d48e51ed1 100644 --- a/content/influxdb3/cloud-dedicated/admin/tables/undelete.md +++ b/content/influxdb3/cloud-dedicated/admin/tables/undelete.md @@ -1,7 +1,7 @@ --- title: Undelete a table description: > - Use the [`influxctl table undelete` command](/influxdb3/cloud-dedicated/reference/cli/influxctl/table/undelete/) + Use the Admin UI or the [`influxctl table undelete` command](/influxdb3/cloud-dedicated/reference/cli/influxctl/table/undelete/) to restore a previously deleted table in your {{< product-name omit=" Cluster" >}} cluster. menu: influxdb3_cloud_dedicated: @@ -17,7 +17,7 @@ related: - /influxdb3/cloud-dedicated/admin/tokens/table/create/ --- -Use the [`influxctl table undelete` command](/influxdb3/cloud-dedicated/reference/cli/influxctl/table/undelete/) +Use the Admin UI or the [`influxctl table undelete` command](/influxdb3/cloud-dedicated/reference/cli/influxctl/table/undelete/) to restore a previously deleted table in your {{< product-name omit=" Cluster" >}} cluster. > [!Important] @@ -36,7 +36,30 @@ other settings as when it was deleted. > After this grace period, all Parquet files associated with the deleted table > are permanently removed and the table cannot be undeleted. -## Undelete a table using the influxctl CLI +{{< tabs-wrapper >}} +{{% tabs %}} +[Admin UI](#admin-ui) +[influxctl](#influxctl) +{{% /tabs %}} +{{% tab-content %}} +{{< admin-ui-access >}} + +In the table list for a database, find the deleted table you want to restore. +Deleted tables are shown with a "Deleted" status indicator. +You can sort on column headers or use the **Search** field to find a specific table. + +1. In the options menu (three vertical dots to the right of the table), click **Restore Table**. The **Restore Table** dialog displays. +2. In the **Restore Table** dialog, review the table name and deletion date. +3. Click the **Restore Table** button to restore the table. +{{% /tab-content %}} +{{% tab-content %}} + +1. If you haven't already, [download and install the `influxctl` CLI](/influxdb3/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl). +2. Use the [`influxctl table undelete` command](/influxdb3/cloud-dedicated/reference/cli/influxctl/table/undelete/) + to restore a deleted table. Provide the following: + + - The name of the database associated with the deleted table + - The ID of the deleted table to restore ```bash { placeholders="DATABASE_NAME|TABLE_ID" } influxctl table undelete DATABASE_NAME TABLE_ID @@ -56,10 +79,12 @@ Replace the following: > the `--filter-status=deleted` flag--for example: > > -> +> > ```bash {placeholders="DATABASE_NAME" } > influxctl table list --filter-status=deleted DATABASE_NAME > ``` > > Replace {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}} > with the name of the database associated with the table you want to undelete. +{{% /tab-content %}} +{{< /tabs-wrapper >}} diff --git a/content/influxdb3/clustered/admin/tables/delete.md b/content/influxdb3/clustered/admin/tables/delete.md index 010fcb5e6..5ab25c1e4 100644 --- a/content/influxdb3/clustered/admin/tables/delete.md +++ b/content/influxdb3/clustered/admin/tables/delete.md @@ -1,7 +1,7 @@ --- title: Delete a table description: > - Use the Admin UI or the [`influxctl table delete` command](/influxdb3/clustered/reference/cli/influxctl/table/delete/) + Use the [`influxctl table delete` command](/influxdb3/clustered/reference/cli/influxctl/table/delete/) to delete a table from a database in your {{< product-name omit=" Cluster" >}} cluster. menu: influxdb3_clustered: @@ -12,15 +12,27 @@ list_code_example: | influxctl table delete ``` related: + - /influxdb3/clustered/admin/tables/undelete/ - /influxdb3/clustered/reference/cli/influxctl/table/delete/ --- -Use the Admin UI or the [`influxctl table delete` command](/influxdb3/clustered/reference/cli/influxctl/table/delete/) +Use the [`influxctl table delete` command](/influxdb3/clustered/reference/cli/influxctl/table/delete/) to delete a table from a database in your {{< product-name omit=" Cluster" >}} cluster. > [!Warning] -> Deleting a table is irreversible. Once a table is deleted, all data stored in -> that table is permanently removed and cannot be recovered. +> #### Wait before writing to a new table with the same name +> +> After deleting a table from your {{% product-name omit=" Cluster" %}} +> cluster, you can reuse the name to create a new table, but **wait two to +> three minutes** after deleting the previous table before writing to the new +> table to allow write caches to clear. + +> [!Note] +> #### Deleted tables may be able to be restored +> +> Deleted tables may be able to be [restored](/influxdb3/clustered/admin/tables/undelete/) +> within the configurable "hard-delete" grace period, depending on when cleanup jobs run. +> After the cleanup job runs, the table and its data are permanently removed. Provide the following arguments: @@ -40,13 +52,11 @@ Replace the following: When prompted, enter `y` to confirm the deletion. -> [!Note] -> #### Wait before reusing a deleted table name -> -> After deleting a table, wait a few minutes before attempting to create a new -> table with the same name to ensure the deletion process has fully completed. -> -> {{% product-name %}} creates tables implicitly using table names specified in -> line protocol written to the databases. To prevent the deleted table from being -> immediately recreated by incoming write requests, pause all write requests to -> the table before deleting it. +{{% note %}} +#### Pause writes before deleting a table + +{{% product-name %}} creates tables implicitly using table names specified in +line protocol written to the databases. +To prevent the deleted table from being immediately recreated by incoming write requests, +pause all write requests to the table before deleting it. +{{% /note %}} diff --git a/content/influxdb3/clustered/admin/tables/undelete.md b/content/influxdb3/clustered/admin/tables/undelete.md index 92ed986f8..36cf07391 100644 --- a/content/influxdb3/clustered/admin/tables/undelete.md +++ b/content/influxdb3/clustered/admin/tables/undelete.md @@ -38,6 +38,13 @@ other settings as when it was deleted. ## Undelete a table using the influxctl CLI +1. If you haven't already, [download and install the `influxctl` CLI](/influxdb3/clustered/reference/cli/influxctl/#download-and-install-influxctl). +2. Use the [`influxctl table undelete` command](/influxdb3/clustered/reference/cli/influxctl/table/undelete/) + to restore a deleted table. Provide the following: + + - The name of the database associated with the deleted table + - The ID of the deleted table to restore + ```bash { placeholders="DATABASE_NAME|TABLE_ID" } influxctl table undelete DATABASE_NAME TABLE_ID ```