influxdb3 debug verify-references

The influxdb3 debug verify-references command checks that every object the cluster’s newest compactor checkpoint references still exists in object storage. It’s the inverse of orphaned file cleanup: the cleanup process proves nothing extra is kept, and this command proves nothing referenced is gone. Use it for general store-integrity audits, for example after an incident, a migration, or suspected data loss.

The command reads directly from object storage and doesn’t need a running InfluxDB 3 Enterprise server.

Usage

influxdb3 debug verify-references [OPTIONS] --cluster-id <CLUSTER_ID>

Options

OptionDescriptionRequired
--object-store <OBJECT_STORE>Object store type. Valid values: s3, google, azure, file, memory. Default: file. Environment variable: INFLUXDB3_OBJECT_STORENo
--bucket <BUCKET>Object store bucket name. Required for s3, google, and azure object store typesVaries
--cluster-id <CLUSTER_ID>Cluster whose references to verify. Environment variable: INFLUXDB3_CLUSTER_IDYes
--engine-path-prefix <ENGINE_PATH_PREFIX>Engine path prefix the cluster runs with, if any. Environment variable: INFLUXDB3_ENGINE_PATH_PREFIXNo
--concurrency <CONCURRENCY>Number of concurrent run-set probes. Must be at least 1No, default 32
--jsonEmit the result as JSONNo
--require-checkpointFail instead of verifying vacuously clean when no checkpoint is recorded for the cluster. Use this to catch a mistyped cluster ID or bucket, which otherwise looks the same as a fresh clusterNo
-h, --helpPrint help informationNo
--help-allPrint detailed help informationNo

influxdb3 debug verify-references accepts the same object store connection options as influxdb3 serve. For example, --aws-access-key-id and --aws-secret-access-key for S3-compatible stores. For the complete object store flag reference, see influxdb3 debug object-store-check.

Exit codes

Automation can gate on the exit code instead of parsing output:

Exit codeMeaning
0Every referenced object exists. This includes a cluster with no checkpoint yet, unless --require-checkpoint is set
1The audit itself couldn’t run (object store errors, an invalid object store configuration, or no checkpoint with --require-checkpoint set). Command-line parse errors, such as an unknown flag or a missing --cluster-id, exit with 2 instead, so check the output before treating 2 as missing data
2One or more referenced objects are missing or unreadable

Examples

Verify a cluster’s compacted-data references

Replace the following:

  • CLUSTER_ID: your cluster identifier
  • S3_BUCKET: your object store bucket name
influxdb3 debug verify-references \
  --object-store s3 \
  --bucket 
S3_BUCKET
\
--cluster-id
CLUSTER_ID

A clean run prints a line similar to:

OK: every compacted-data reference exists

Gate automation on a required checkpoint

Use --require-checkpoint in a script so a mistyped cluster ID or bucket fails loudly instead of reporting a vacuously clean result:

influxdb3 debug verify-references \
  --object-store s3 \
  --bucket 
S3_BUCKET
\
--cluster-id
CLUSTER_ID
\
--require-checkpoint \ --json

Was this page helpful?

Thank you for your feedback!