8000 feat: support influxdb v2 through influx cli by sranka · Pull Request #201 · gobackup/gobackup · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: support influxdb v2 through influx cli #201

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

Merged
merged 4 commits into from
Dec 6, 2023
Merged

feat: support influxdb v2 through influx cli #201

merged 4 commits into from
Dec 6, 2023

Conversation

sranka
Copy link
Contributor
@sranka sranka commented Dec 5, 2023

This PR adds support for InfluxDB v2 OSS as a source database.

It is required to have influx cli installed and in the PATH, at least for the gobackup tool.

An example configuration with influxdb v2 database backup:

# gobackup config example
# -----------------------
# Put this file in follow place:
# ~/.gobackup/gobackup.yml or /etc/gobackup/gobackup.yml
# or run the gobackup tool with --config option pointing to this file
web:
  username: gobackup
  password: 123456
models:
  influxdb2_backup:
    description: "Perform local influxdb v2 backup"
    schedule:
      # At 04:05 on Sunday.
      cron: "5 4 * * sun"
    compress_with:
      type: tgz
    default_storage: local
    storages:
      local:
        type: local
        keep: 10
        path: /tmp/gobackup
    databases:
      influxdbv2-oss:
        type: influxdb2
        host: http://localhost:8086
        token: my-token

type, token and host properties are required

  • type must be influxdb2
  • host (string) - HTTP address of InfluxDB
  • token (string) - InfluxDB v2 API token

All other properties of influxdb2 database are optional:

  • bucket (string) - name of the bucket to back up from
  • bucket_id (string) - ID of the bucket to back up from
  • org(string) - organization name
  • org_id (string) - organization ID
  • skip_verify (boolean) - whether to skip TLS certificate verification
  • http_debug (boolean) - whether to inspect communication with InfluxDB server

See also https://docs.influxdata.com/influxdb/v2/reference/cli/influx/backup/

@huacnlee huacnlee self-assigned this Dec 5, 2023
@sranka sranka marked this pull request as ready for review December 5, 2023 15:28
@sranka sranka requested a review from huacnlee December 5, 2023 15:37
@huacnlee huacnlee merged commit 425f9d3 into gobackup:main Dec 6, 2023
@huacnlee
Copy link
Collaborator
huacnlee commented Dec 6, 2023

@sranka
Copy link
Contributor Author
sranka commented Dec 6, 2023

Thank you for your swift response and actions 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0