<@U04SE163WC8> how to backup docker oss airbyte?
# ask-ai
s
@kapa.ai how to backup docker oss airbyte?
u
To backup a Docker OSS Airbyte instance, you can follow these steps: 1. Stop all services and only start the database to prevent any new data/update in it.
Copy code
docker-compose down    docker-compose up -d db
You can check with
docker ps
and should see only the database container running. 2. Create the backup database file.
Copy code
docker exec airbyte-db pg_dump -U docker airbyte &gt; airbyte_backup.sql
This will generate a local SQL file. You can check the file size and compress it if it is too big. 3. Stop the database again.
Copy code
docker-compose down
To restore the backup on a new instance: 1. Copy/transfer the SQL file to your new server. 2. Start Airbyte using
docker-compose up -d
after the service is running let’s stop to rebuild the database with
docker-compose down
. 3. Start only the database
docker-compose up -d db
4. Run the following commands:
Copy code
docker exec airbyte-db psql -U docker -c &#x27;drop database airbyte&#x27;;    docker exec airbyte-db psql -U docker -c &#x27;create database airbyte with owner docker;&#x27;    cat airbyte.sql| docker exec -i airbyte-db psql -U docker -d airbyte    docker-compose up -d
5. You must trigger all connections again to create the temporal workflow for them again. You can use the Airbyte API to do it. Please note that this tutorial uses the default airbyte-db credentials, so pay attention if you have changed them. Also, try to use the same Airbyte platform version in both instances. For more details, you can refer to this [forum post](https://discuss.airbyte.io/t/3514) on the Airbyte community forum.