Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrate existing Airflow DB to Cloud Composer

Is there any way to migrate an existing Airflow instance onto Google Cloud Composer?

We're currently running our own instance of Airflow using postgres for the db. Ideally we'd be able to preserve the existing history of the DAGs, which I believe would require copying the entire database over. Is this possible?

like image 232
Ayden Wong Avatar asked Oct 16 '22 17:10

Ayden Wong


1 Answers

All of the Airflow metadata is kept in the database instance. For PostgreSQL, you could do a pg_dump on your current database followed by a pg_restore into your Composer database in core-sql_alchemy_conn. In the Composer docs, I don't see it specifically mentioned anywhere which database they use, but I'm assuming they're on PostgreSQL as well.

You want to be careful to make sure that your existing database is running the same Airflow version as Composer. Composer is currently on Airflow 1.9.0.

like image 132
Taylor D. Edmiston Avatar answered Oct 20 '22 22:10

Taylor D. Edmiston