InfluxDB数据备份与恢复
一、基本命令
命令:influxd backup -database dbName backup_path
可选参数:
-retention <retention policy name>
-shard <shard ID>
-since <date>
参数解析:
retention:This flag can be used to backup a specific retention policy. For more information on retention policies, please see here. If not specified, all retention policies will be backed up.
shard:This flag can be used to backup a specific shard ID. To see which shards are available, you can run the command SHOW SHARDS using the InfluxDB query language. If not specified, all shards will be backed up.
since:This flag can be used to create a backup since a specific date, where the date must be in RFC3339 format (for example, 2015-12-24T08:12:23Z). This flag is important if you would like to take incremental backups of your database. If not specified, all timeranges within the database will be backed up.
二、数据备份(必须先备份元数据,再备份数据