gcloud sql import sql my-db gs://my-bucket/dump.sql.gz --database appdb

Category: Google Cloud & Workspace

gcloud sql import sql my-db gs://my-bucket/dump.sql.gz --database appdb

Import a SQL dump into a database

Loads the SQL dump from the bucket into the appdb database on my-db, replacing its contents. The dump must come from a compatible engine version. Use it to restore backups or seed a fresh instance; create the dump with gcloud sql export sql.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.