Júlia Lemes
08/22/2025, 11:58 AMkapa.ai
08/22/2025, 11:59 AMsql CREATE DATABASE airbyte WITH OWNER = <your_user>; CREATE DATABASE temporal WITH OWNER = <your_user>; CREATE DATABASE temporal_visibility WITH OWNER = <your_user>; Replace <your_user> with the username you will use for Airbyte. This user should have sufficient privileges on these databases. --- ### 3. Create Kubernetes Secret for Database Credentials - Create a Kubernetes secret (e.g., airbyte-config-secrets) with your database credentials: yaml apiVersion: v1 kind: Secret metadata: name: airbyte-config-secrets type: Opaque stringData: database-user: <your_user> database-password: <your_password> Replace <your_user> and <your_password> with your actual credentials. --- ### 4. Configure Airbyte Helm Values - In your values.yaml, disable the internal Postgres and configure the external database: yaml postgresql: enabled: false global: database: type: external secretName: "airbyte-config-secrets" host: "<rds-endpoint>" port: "5432" database: "airbyte" userSecretKey: "database-user" passwordSecretKey: "database-password" Replace <rds-endpoint> with your RDS hostname. --- ### 5. Deploy Airbyte - Install or upgrade Airbyte using Helm: bash helm install <release-name> airbyte/airbyte -f values.yaml --timeout 10m0s If you encounter timeout issues, increase the timeout as shown above. --- ### 6. Verify Deployment - Ensure all Airbyte pods are running. - Check logs for any database connection errors. - If you restored from a backup, ensure the schema matches Airbyte’s requirements. --- Notes: - The database password must be set in the Kubernetes secret, not directly in values.yaml. - Supported Postgres versions (as tested): 12.19, 13.15, 14.12, 15.7, 16.3, 17.1. - If you encounter issues, double-check network access, security groups, and that the databases exist and are owned by the correct user. --- For more details and troubleshooting, refer to the official documentation and community discussions: - [Airbyte External Database Setup](https://docs.airbyte.com/platform/1.7/deploying-airbyte/integrations/database) - [Minimal Postgres Version Supported as External Database](https://github.com/airbytehq/airbyte/issues/48542)Júlia Lemes
08/22/2025, 12:01 PMkapa.ai
08/22/2025, 12:01 PMkapa.ai
08/22/2025, 12:01 PMsecrets.yaml file with your database credentials: yaml apiVersion: v1 kind: Secret metadata: name: airbyte-config-secrets type: Opaque stringData: database-user: <your_user> database-password: <your_password> Replace <your_user> and <your_password> with your actual credentials. - Create a values.yaml file to configure Airbyte to use the external database: yaml postgresql: enabled: false global: database: type: external secretName: "airbyte-config-secrets" host: "<your-db-host>" port: "5432" database: "airbyte" userSecretKey: "database-user" passwordSecretKey: "database-password" Replace <your-db-host> with your database host. --- ### 3. Install Airbyte with abctl - Run the following command to install Airbyte using your configuration: bash abctl local install --values ./values.yaml --secret ./secrets.yaml Note: If you are using an external database, you do not need to use the --migrate flag. The migration flag is only needed if you are migrating data from a previous Docker Compose installation and are not using an external database. --- For more details and examples, see the official documentation: - [Airbyte: Migrating from Docker Compose](https://docs.airbyte.com/platform/1.7/deploying-airbyte/migrating-from-docker-compose) - [Airbyte: External Database Integration](https://docs.airbyte.com/platform/1.7/deploying-airbyte/integrations/database) If you need to migrate data from an existing Docker Compose instance, follow the migration steps, but remember that with an external database, the --migrate flag is not required.Júlia Lemes
08/22/2025, 5:35 PMkapa.ai
08/22/2025, 5:35 PMkapa.ai
08/22/2025, 5:36 PMsql GRANT ALL PRIVILEGES ON DATABASE airbyte TO <user>; GRANT ALL PRIVILEGES ON DATABASE temporal TO <user>; GRANT ALL PRIVILEGES ON DATABASE temporal_visibility TO <user>; - All privileges on the public schema in each database: The user should also have all privileges on the public schema: sql GRANT ALL PRIVILEGES ON SCHEMA public TO <user>; These permissions are necessary for Airbyte to initialize its schema, create tables, and perform migrations. If the user does not have these permissions, you may encounter errors such as "permission denied for schema public" or issues during startup and schema initialization [Forum: Unable to create SQL database](https://discuss.airbyte.io/t/1544), [GitHub Issue: Document grants required for external airbyte database](https://github.com/airbytehq/airbyte/issues/60244). Summary: - The Airbyte user must have all privileges on the Airbyte, temporal, and temporal_visibility databases and on the public schema within each of those databases. - The user does not need superuser privileges, but must be able to create tables, indexes, and perform all DDL/DML operations required by Airbyte. If you follow these grant statements, you should have the necessary permissions for Airbyte to function with an external Postgres database.Júlia Lemes
08/22/2025, 6:16 PMkapa.ai
08/22/2025, 6:16 PMkapa.ai
08/22/2025, 6:17 PMairbyte-db-0): bash kubectl get pods --all-namespaces | grep db - Running pg_dump inside the Postgres pod: bash kubectl exec -n <namespace> -it <database_pod> -- bash -c "pg_dump -U airbyte db-airbyte > /tmp/airbyte_backup.sql" - Copying the backup file to your local machine: bash kubectl cp <namespace>/<database_pod>:/tmp/airbyte_backup.sql ./airbyte_backup.sql If you are running Airbyte with Docker, you can use: bash docker exec airbyte-db pg_dump -U docker airbyte > airbyte_backup.sql --- ### 2. Restore the Backup to the External Database - Manually create the required databases on your external Postgres instance (e.g., RDS): sql CREATE DATABASE airbyte WITH OWNER = <user>; CREATE DATABASE temporal WITH OWNER = <user>; CREATE DATABASE temporal_visibility WITH OWNER = <user>; - Restore the backup to the new database: bash psql -h <external-db-host> -U <user> -d airbyte -f airbyte_backup.sql (Repeat for other databases if needed.) --- ### 3. Configure Airbyte to Use the External Database - Update your Airbyte deployment configuration (e.g., values.yaml for Helm) to point to the external database and disable the internal one. Example: yaml postgresql: enabled: false global: database: type: external secretName: "airbyte-config-secrets" host: "<external-db-host>" port: "5432" database: "airbyte" userSecretKey: "database-user" passwordSecretKey: "database-password" - Make sure your Kubernetes secret (airbyte-config-secrets) contains the correct credentials. --- ### 4. Deploy Airbyte with the New Configuration - Redeploy Airbyte so it connects to the external database. --- Important Notes: - Airbyte does not automatically migrate data from the internal to the external database; you must perform the backup and restore manually. - Ensure both Airbyte instances (old and new) are using the same version to avoid schema mismatches. - This process will migrate your configuration, connections, and state, but not job sync history/logs if you do not include those in your backup. References: - [How to upgrade and backup internal database](https://docs.airbyte.com/platform/deploying-airbyte/chart-v2-community#how-to-upgrade) - [Forum: Connecting to an External Postgres database](https://discuss.airbyte.io/t/2903) - [Forum: Docker to Docker migration (backup/restore)](https://discuss.airbyte.io/t/3514) - [GitHub Issue: External Postgres Database Setup Issues](https://github.com/airbytehq/airbyte/issues/49304) If you need more details for your specific deployment type, let me know!