B i M A P

InfluxDB v2|how to backup data and restore in 5 minutes

influxdb

建立 influx config

建立登入資訊

influx config create -n your-config -u http://localhost:8086 -p admin:password -o your-bucket


啟用 config

因登入資訊可能為多個,所以需要指令使用哪一個登入資訊

influx config your-config

以上做法可以省去找 token 的時間


備份指令

influx backup -b your-bucket-name /tmp/backup_$(date '+%Y-%m-%d_%H-%M')


還原指令

如果 bucket name 不變的話,可以不用特別指定 --new-bucket

influx restore /tmp/backup_2023-08-08_17-19/ --bucket your-bucket-name --new-bucket your-new-bucket-name


延伸閱讀
winstonlu的大頭照
ELK 達人

我們致力於 ELK 的各種應用,協助企業建置相關服務。我們也提供基於 ELK 的各種解決方案,有任何問題,歡迎加入我們的官方 Line,或來信詢問,期待與您面對面的機會。