How do I control how many entries are stored in influx DB

I have looked at the settings and I am only including certain entities but I don’t see a way to limit storage to something like 2 years

That is done in the InfluxDB web console: