9

I had data from last 7 days in influx. I applied retention policy and suddenly all data got deleted. i have single instance of influx running.

CREATE RETENTION POLICY stats_30_day ON server_stats DURATION 30d REPLICATION 1

ALTER RETENTION POLICY stats_30_day ON server_stats DURATION 30d REPLICATION 1 default

Any idea what went wrong ?

Nishant Kumar
  • 2,199
  • 2
  • 22
  • 43

1 Answers1

15

You changed what your default retention policy is. So when you query you'll have to specify the other retention policy. See: https://docs.influxdata.com/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#missing-data-after-creating-a-new-default-retention-policy

Paul Dix
  • 1,967
  • 16
  • 8