Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If a DAG ran successfully how do you run an Airflow backfill from command line?

Tags:

airflow

I have a DAG that runs daily that I've done some changes to and I need to rerun it for several months.

If I go to the Airflow UI I can clear and it will run, but that's a lot of clicking. Is there another way to do this? if I do the backfill from the command line like this:

airflow backfill -s 20200101 -e 20200301 daily_dag_name

This won't actually run the dag, I believe that's because it ran successfully and the backfill only works if it failed.

like image 753
KristiLuna Avatar asked Dec 21 '25 18:12

KristiLuna


1 Answers

Since there are already DAG runs for the execution dates, there is nothing to backfill. What you need is to clear those DAG runs that will re-trigger the runs for the given time period:

airflow tasks clear -s 20200101 -e 20200301 daily_dag_name
like image 62
SergiyKolesnikov Avatar answered Dec 24 '25 10:12

SergiyKolesnikov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!