Airflow resetdb

Hi

How can I run resetdb on the cloud deployment?
I can see that this is available when building locally through the astro airflow kill + astro airflow start, but I haven’t been able to reset the deployed db.

Hi @bgutu. On Astronomer Cloud, you unfortunately cannot currently reset or wipe Airflow’s underlying metadata database (hosted by Astronomer) on an Astronomer Cloud deployment.

You can do so with an astro airflow kill and astro airflow start when developing locally, but if you want to clear out all DAG run history on a particular Airflow instance on Cloud, you have two options:

1. Create a new Deployment

  • Delete that deployment, create a new one, re-input your variables/connections and redeploy your DAGs to a fresh deployment with a fresh database
  • For context, each astro airflow deploy overwrites the pre-existing code on the instance.

2. Delete DAG Runs manually via the Airflow UI

  • You could always delete both tasks and DAG runs from Airflow’s Web UI directly

Note: The Airflow CLI’s clear command (https://airflow.apache.org/cli.html#clear) would also not work here, as Astronomer currently only supports the Airflow CLI when developing locally.