Simple Data Replicator
Replicating data between InfluxDB 3 instances shouldn’t mean writing your own retry logic and queue management. The Simple Data Replicator Plugin does it for you, streaming data to a remote instance on a schedule or on every write, with compressed buffering, automatic retries, and field-level filtering and renaming built in. Point it at a source and a destination, and it keeps data flowing even when the network doesn’t cooperate.
Configuration
Plugin parameters may be specified as key-value pairs in the --trigger-arguments flag (CLI) or in the trigger_arguments field (API) when creating a trigger. This plugin supports TOML configuration files, which can be specified using the config_file_path parameter; values in the file override the arguments passed to the trigger.
Plugin metadata
This plugin includes a JSON metadata schema in its docstring that defines supported trigger types and configuration parameters. This metadata enables the InfluxDB 3 Explorer UI to display and configure the plugin.
Scheduler mode parameters
Multi-value arguments (excluded_fields, field_renames) use delimited strings on the CLI and native TOML types (lists/tables) in a config file.
| Argument | Description | Required | Example (CLI) | Example (TOML) | Default |
|---|---|---|---|---|---|
host |
Remote InfluxDB host URL. Default scheme http, port 8181. |
true |
example.com |
host = "example.com" |
None |
remote_token |
Remote InfluxDB API token. Falls back to REMOTE_INFLUXDB_TOKEN env var. |
false |
apiv3_AuHk... |
remote_token = "apiv3_AuHk..." |
None |
database |
Remote database name. | true |
remote_db |
database = "remote_db" |
None |
source_measurement |
Measurement to replicate. | true |
home |
source_measurement = "home" |
None |
window |
Time window per job. Format number:unit (s, min, h, d, w). |
true |
1h |
window = "1h" |
None |
unique_file_suffix |
Unique suffix for the queue file to avoid conflicts. | true |
abcd1234 |
unique_file_suffix = "abcd1234" |
None |
max_size |
Maximum size for the queue file in MB. Integer ≥ 1. | false |
1024 |
max_size = 1024 |
512 |
verify_ssl |
Whether to verify SSL certificates when connecting via HTTPS. | false |
false |
verify_ssl = false |
true |
max_retries |
Maximum number of retries for write operations. Integer ≥ 1. | false |
5 |
max_retries = 5 |
3 |
queue_flush_chunk_size |
Line-protocol entries sent per remote flush request. Integer ≥ 1. | false |
1000 |
queue_flush_chunk_size = 1000 |
500 |
excluded_fields |
Fields and tags to exclude. CLI: space-separated. TOML: list. | false |
co location |
excluded_fields = ["co", "location"] |
None |
target_table |
New name for the measurement in the remote database. | false |
home2 |
target_table = "home2" |
source_measurement |
field_renames |
Field renames. CLI: old:new pairs separated by space. TOML: table. |
false |
temp:temperature |
field_renames = {temp = "temperature"} |
None |
offset |
Time offset to apply to the window. Format number:unit (s, min, h, d, w). |
false |
10min |
offset = "10min" |
0 |
config_file_path |
Path to the TOML config file. Absolute, or relative to PLUGIN_DIR. |
false |
config.toml |
— | None |
Data write mode parameters
Multi-value arguments (tables, excluded_fields, tables_rename, field_renames) use delimited strings on the CLI and native TOML types (lists/tables) in a config file.
| Argument | Description | Required | Example (CLI) | Example (TOML) | Default |
|---|---|---|---|---|---|
host |
Remote InfluxDB host URL. Default scheme http, port 8181. |
true |
example.com |
host = "example.com" |
None |
remote_token |
Remote InfluxDB API token. Falls back to REMOTE_INFLUXDB_TOKEN env var. |
false |
apiv3_AuHk... |
remote_token = "apiv3_AuHk..." |
None |
database |
Remote database name. | true |
remote_db |
database = "remote_db" |
None |
unique_file_suffix |
Unique suffix for the queue file to avoid conflicts. | true |
wxyz5678 |
unique_file_suffix = "wxyz5678" |
None |
tables |
Tables to replicate; all tables if omitted. CLI: space-separated. TOML: list. | false |
home home2 |
tables = ["home", "home2"] |
None |
verify_ssl |
Whether to verify SSL certificates when connecting via HTTPS. | false |
false |
verify_ssl = false |
true |
max_size |
Maximum size for the queue file in MB. Integer ≥ 1. | false |
1024 |
max_size = 1024 |
512 |
queue_flush_chunk_size |
Line-protocol entries sent per remote flush request. Integer ≥ 1. | false |
1000 |
queue_flush_chunk_size = 1000 |
500 |
excluded_fields |
Fields/tags to exclude per table. CLI: table:f1|f2 blocks separated by space. TOML: table of lists. |
false |
home:co|location home2:temp |
excluded_fields = {home = ["co", "location"], home2 = ["temp"]} |
None |
tables_rename |
Table renames. CLI: old:new pairs separated by space. TOML: table. |
false |
home:home2 office:office2 |
tables_rename = {home = "home2", office = "office2"} |
None |
field_renames |
Field renames per table. CLI: table:old=new\|old=new blocks separated by space. TOML: nested table. |
false |
home:temp=temperature|hum=humidity |
[field_renames]home = {temp = "temperature", hum = "humidity"} |
None |
config_file_path |
Path to the TOML config file. Absolute, or relative to PLUGIN_DIR. |
false |
config.toml |
— | None |
Authentication
The remote API token is read from the remote_token argument first; if it is not set, the plugin falls back to the REMOTE_INFLUXDB_TOKEN environment variable. If neither is provided, the plugin returns an error.
File path resolution
The config_file_path and the queue directory follow the same resolution logic:
- Absolute paths are used as-is.
- Relative paths are resolved from the
PLUGIN_DIRenvironment variable. IfPLUGIN_DIRis not set, the plugin falls back toINFLUXDB3_PLUGIN_DIRand then the parent ofVIRTUAL_ENV.
If none of these are available, the plugin returns an error.
Example TOML configuration
- simple_data_replicator_config_scheduler.toml — scheduler mode
- simple_data_replicator_config_data_writes.toml — data write mode
Data requirements
The plugin assumes the table schema is already defined in the local database; it relies on this schema to retrieve the field and tag names required for processing. The remote target database must already exist.
Ready to get started?
Download InfluxDB 3 and have running in minutes.