From 791495e58bb97caa910bb45ad679cdc821516588 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Mon, 27 Sep 2021 15:38:30 -0500 Subject: [PATCH] Document replicating a Cloud organization (#3147) Closes #3067 --- .../cloud/organizations/migrate-org.md | 50 +++++++++++++++++++ .../v2.0/reference/cli/influx/write/_index.md | 9 ++++ 2 files changed, 59 insertions(+) create mode 100644 content/influxdb/cloud/organizations/migrate-org.md diff --git a/content/influxdb/cloud/organizations/migrate-org.md b/content/influxdb/cloud/organizations/migrate-org.md new file mode 100644 index 000000000..814915ed4 --- /dev/null +++ b/content/influxdb/cloud/organizations/migrate-org.md @@ -0,0 +1,50 @@ +--- +title: Replicate an organization +seotitle: Replicate an organization in InfluxDB Cloud +description: Replicate the state of an organization in InfluxDB Cloud +menu: + influxdb_cloud: + name: Replicate an organization + parent: Manage organizations +weight: 110 +--- + +The state of an organization consists of metadata (dashboards, buckets, and other resources) and data (time-series). +An organization's state at a point in time can be +replicated to another organization by copying both metadata and data. +To replicate the state of an organization: + +1. Create a new organization using the [InfluxDB Cloud sign up page](https://cloud2.influxdata.com/signup). + Use a different email address for the new organization. +2. **Replicate metadata**. + Use an [InfluxDB template](/influxdb/cloud/influxdb-templates/create/) to migrate metadata resources. + Export all resources, like dashboards and buckets, to a template manifest + with [`influx export all`](/influxdb/cloud/influxdb-templates/create/#export-all-resources). + Then, [apply the template](/influxdb/cloud/reference/cli/influx/apply/#examples-how-to-apply-a-template-or-stack) + to the new organization. +3. **Replicate data**. + Use one of the methods below to copy data to the new organization: + + - [Export data to CSV](#export-data-to-csv) + - [Write data with Flux](#write-data-with-flux) +4. Re-invite users. + +### Export data to CSV +1. Perform a query to return all specified data. +2. Save the results as CSV (to a location outside of InfluxDB Cloud). +3. Write the CSV data into a bucket in the new organization + using the [`influx write`](/influxdb/cloud/reference/cli/influx/write/) command. + +### Write data with Flux +Perform a query to return all specified data. +Write results directly to a bucket in the new organization with the Flux +[`to()` function](/flux/v0.x/stdlib/influxdata/influxdb/to/). + +{{% note %}} +If writes are prevented by rate limiting, +use the [`influx write --rate-limit`](/influxdb/cloud/reference/cli/influx/write/#write-annotated-csv-data-using-rate-limiting) +flag to control the rate of writes. + +For more information on rate limits in InfluxDB Cloud, +see ["Exceeded rate limits"](/influxdb/cloud/account-management/data-usage/#exceeded-rate-limits). +{{% /note %}} diff --git a/content/influxdb/v2.0/reference/cli/influx/write/_index.md b/content/influxdb/v2.0/reference/cli/influx/write/_index.md index 40d84b136..f97d234e3 100644 --- a/content/influxdb/v2.0/reference/cli/influx/write/_index.md +++ b/content/influxdb/v2.0/reference/cli/influx/write/_index.md @@ -114,6 +114,7 @@ In **extended annotated CSV**, measurements, fields, and values and their types - [from multiple sources](#write-annotated-csv-data-from-multiple-sources) - [and prepend annotation headers](#prepend-csv-data-with-annotation-headers) - [from a compressed file](#write-annotated-csv-data-from-a-compressed-file) +- [using rate limiting](#write-annotated-csv-data-using-rate-limiting) ### Line protocol @@ -276,3 +277,11 @@ influx write \ --file path/to/data.csv.comp \ --compression gzip ``` + +##### Write annotated CSV data using rate limiting +```sh +influx write \ + --bucket example-bucket \ + --file path/to/data.csv \ + --rate-limit 5 MB / 5 min +```