The backup/restore documentation says that I can use:
influxd backup -portable -start <timestamp> <path-to-backup>
without the (optional) -end
argument.
I recently tried that with InfluxDB 1.8.4:
[afausti@lsst-login01 ~]$ influxd backup -portable -database efd -host 127.0.0.1:8088 -start 2021-03-02T00:00:00Z summit-efd-diff.influx
2021/03/04 17:24:55 backing up metastore to summit-efd-diff.influx/meta.00
2021/03/04 17:24:56 backing up db=efd
2021/03/04 17:24:57 backing up db=efd rp=autogen shard=243 to summit-efd-diff.influx/efd.autogen.00243.00 with boundaries start=2021-03-02T00:00:00Z, end=0001-01-01T00:00:00Z
I was expecting InfluxDB to figure out the end timestamp for me, but instead it shows end=0001-01-01T00:00:00Z
. I confirm that, in this case, it ignores the -start
timestamp and dumps all shards.
Using -start
with -end
works fine, and it dumps only recent data:
[afausti@lsst-login01 ~]$ influxd backup -portable -database efd -host 127.0.0.1:8088 -start 2021-03-02T00:00:00Z -end 2021-03-04T17:00:00Z summit-efd-diff.influx
2021/03/04 18:27:00 backing up metastore to summit-efd-diff.influx/meta.00
2021/03/04 18:27:01 backing up db=efd
2021/03/04 18:27:01 backing up db=efd rp=autogen shard=243 to summit-efd-diff.influx/efd.autogen.00243.00 with boundaries start=2021-03-02T00:00:00Z, end=2021-03-04T17:00:00Z
I like the idea of using -start
without -end
and let InfluxDB figure out the exact end timestamp for me. The documentation says it should work, so it looks like a bug.
Thank you!