Take a backup of the postgresql database before an upgrade

Is there a way to take a backup of the airflow database? we are thinking of doing this as we plan to upgrade the airflow version in astronomer.

any help would be appreciated.

I don’t think there is and I am not sure there would be a purpose to as you can’t downgrade after updating to a newer version, so even if you needed to restore the database the backup would most likely be in a different schema than the version you updated to.

Thank you very much! Appreciate you helpful response.