I’ve some question about how the new online backup/restore procedure deals with time on InfluxDB 1.5.2.
I made a backup of everything on my main InfluxDB (about 1year / 30GB of data), limiting the data to midnight of today; here my backup command (executed from another host):
influxd backup -portable -host myPrimaryDB:8090 -end 2018-05-08T00:00:00Z /influxdb/backup
The targeting host is a “clone” of the first one so, basically, either the OS, the packages versions, and the InfluxDB version one are the same between those.
After the backup was done, I proceeded to restore with this:
influxd restore -portable -host 127.0.0.1:8090 /influxdb/backup
Restore done, I’ve seen the databases are all restored, either the policies and everything else, great.
Except for the fact that, on the restored database, I found data newer than the end date issued in the backup command:
> select * from swap order by time desc limit 1 name: swap time free host in out total used used_percent ---- ---- ---- -- --- ----- ---- ------------ 2018-05-08T01:35:13Z 4112416768 myhost 45965312 411484160 4294963200 182546432 4.250244379276637
The last copied data date, also, isn’t identical for all measurements. On other databases I have different timestamps as last value:
> select * from swap order by time desc limit 1 name: swap time free host in out total used used_percent ---- ---- ---- -- --- ----- ---- ------------ 2018-05-08T01:11:35Z 1065242624 anotherhost 1282048 12476416 1073737728 8495104 0.7911712309693564
So, my questions are basically two:
- How InfluxDB backup works when dealing with time? Why there are data newer than what I expecting?
- In the case I’ll ignore that behaviour and proceed to perform another backup from today at 00:00:01, restoring it on the same InfluxDB instance, how duplicate data will be managed during the restore process?
Hoping someone have answers to my weird questions, thanks in advance,