Dump a Cloud SQL database without stressing the instance

  • Posted: July 30, 2026
  • Updated: July 31, 2026

Some applications have customers all over the world, so there is no way to put the production instance down for maintenance. Still, you need a dump of the production database to create new dev environments and so on.

This is the solution:

gcloud sql export sql ${INSTANCE_NAME} \
    gs://${BUCKET_NAME}/${DUMP_NAME} \
    --database=${DB_NAME} \
    --offload

With the --offload option, a temporary instance is created from a snapshot and the dump is processed there. Your production instance is not stressed.

Notes: