문주은
08/27/2025, 1:14 AMkapa.ai
08/27/2025, 1:15 AMairbyte-db-0). - Run pg_dump inside the Postgres pod to create a backup: bash kubectl exec -n <namespace> -it <database_pod> -- bash -c "pg_dump -U airbyte db-airbyte > /tmp/airbyte_backup.sql" - Copy the backup file to your local machine: bash kubectl cp <namespace>/<database_pod>:/tmp/airbyte_backup.sql ./airbyte_backup.sql - For Docker deployments: - Stop all Airbyte services except the database. - Run: bash docker exec airbyte-db pg_dump -U docker airbyte > airbyte_backup.sql - Transfer the airbyte_backup.sql file to your new server. ### 2. Restore the Database on the New Server - For Kubernetes: - Copy the backup file into the new database pod: bash kubectl cp ./airbyte_backup.sql <namespace>/<database_pod>:/tmp/airbyte_backup.sql - Drop and recreate the schema (this erases all data in the database): bash kubectl exec -n <namespace> -it <database_pod> -- bash -c "psql -U airbyte -d db-airbyte -c 'DROP SCHEMA public CASCADE; CREATE SCHEMA public;'" - Restore the backup: bash kubectl exec -n <namespace> -it <database_pod> -- bash -c "psql -U airbyte -d db-airbyte < /tmp/airbyte_backup.sql" - For Docker: - On the new server, start only the database container. - Drop and recreate the database: bash docker exec airbyte-db psql -U docker -c 'drop database airbyte'; docker exec airbyte-db psql -U docker -c 'create database airbyte with owner docker;' - Restore the backup: bash cat airbyte_backup.sql | docker exec -i airbyte-db psql -U docker -d airbyte - Start all Airbyte services. Important: - Both Airbyte instances (old and new) should be running the same version to avoid compatibility issues. - This process will not migrate job sync history/logs or Temporal data unless you also back up and restore those databases if used. - After restoring, you may need to trigger all connections again to recreate Temporal workflows. For more details and step-by-step instructions, see the following sources: [How to import/export Airbyte to a new instance (docker to docker deploy)](https://discuss.airbyte.io/t/3514), [Upgrade to Helm chart V2 (Self-Managed Community)](https://docs.airbyte.com/platform/deploying-airbyte/chart-v2-community#how-to-upgrade), [Forum: Migrate Airbyte config from one deployment to another (OSS)](https://discuss.airbyte.io/t/370).kapa.ai
08/27/2025, 1:15 AMairbyte-db-0): kubectl get pods --all-namespaces | grep db - Run pg_dump inside the Postgres pod: kubectl exec -n <namespace> -it <database_pod> -- bash -c "pg_dump -U airbyte db-airbyte > /tmp/airbyte_backup.sql" - Copy the backup to your local machine: kubectl cp <namespace>/<database_pod>:/tmp/airbyte_backup.sql ./airbyte_backup.sql [How to upgrade - Airbyte Docs](https://docs.airbyte.com/platform/deploying-airbyte/chart-v2-community#how-to-upgrade) - For Docker deployments: - Stop all services except the database: docker-compose down docker-compose up -d db - Create the backup: docker exec airbyte-db pg_dump -U docker airbyte > airbyte_backup.sql [How to import/export Airbyte to a new instance (docker to docker deploy)](https://discuss.airbyte.io/t/3514) ### 2. Restore the Database on the New Server - For Kubernetes: - Copy the SQL backup file into your pod: kubectl cp ./airbyte_backup.sql <namespace>/<database_pod>:/tmp/airbyte_backup.sql - Drop and recreate the schema (this erases all data in the database): kubectl exec -n <namespace> -it <database_pod> -- bash -c "psql -U airbyte -d db-airbyte -c 'DROP SCHEMA public CASCADE; CREATE SCHEMA public;'" - Restore the database: kubectl exec -n <namespace> -it <database_pod> -- bash -c "psql -U airbyte -d db-airbyte < /tmp/airbyte_backup.sql" [Deploy Airbyte - Airbyte Docs](https://docs.airbyte.com/platform/deploying-airbyte/chart-v2-community#deploy-airbyte) - For Docker: - On the new server, start only the database: docker-compose up -d db - Drop and recreate the database: docker exec airbyte-db psql -U docker -c 'drop database airbyte'; docker exec airbyte-db psql -U docker -c 'create database airbyte with owner docker;' - Restore the backup: cat airbyte_backup.sql | docker exec -i airbyte-db psql -U docker -d airbyte - Start Airbyte: docker-compose up -d [How to import/export Airbyte to a new instance (docker to docker deploy)](https://discuss.airbyte.io/t/3514) ### Important Notes - Version Compatibility: Both Airbyte instances (source and target) should be running the same version to avoid compatibility issues. - State and Logs: This method preserves connection states and job history. If you use the API to recreate connections, you may lose incremental sync state and job logs. - Cloud Migration: If you are migrating from OSS to Airbyte Cloud, direct import/export is not currently supported; you must recreate connectors manually in the Cloud UI [Migrate from Airbyte OSS to Airbyte Cloud Questions](https://discuss.airbyte.io/t/130). If you need to migrate only configuration (not the full database), Airbyte does not currently provide a built-in migration feature for this purpose, so database backup/restore is the most complete method available.