gcloud_alpha_sql_import_sql (1)
NAME
- gcloud alpha sql import sql - imports data into a Cloud SQL instance from a SQL dump file
SYNOPSIS
-
gcloud alpha sql import sql INSTANCE URI [--async] [--database=DATABASE, -d DATABASE] [--user=USER] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) gcloud alpha sql import sql imports data into a Cloud SQL instance
For detailed help on importing data into Cloud SQL, refer to this guide: cloud.google.com/sql/docs/mysql/import-export/importing
POSITIONAL ARGUMENTS
-
- INSTANCE
-
Cloud SQL instance ID.
- URI
-
Path to the MySQL dump file in Google Cloud Storage from which the import is
made. The URI is in the form gs://bucketName/fileName. Compressed gzip files
(.gz) are also supported.
FLAGS
-
- --async
-
Display information about the operation in progress, without waiting for the
operation to complete.
- --database=DATABASE, -d DATABASE
-
Database (for example, guestbook) to which the import is made. If not set, it is
assumed that the database is specified in the file to be imported.
- --user=USER
-
PostgreSQL user for this import operation.
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
EXAMPLES
To import data from a SQL dump file into a database, testdb, on the specified Cloud SQL instance test-instance-1, run:
-
$ gcloud sql import sql test-instance-1 \
gs://test-bucket/test-file.sql.gz --database=testdb
NOTES
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support These variants are also available:
- $ gcloud sql import sql $ gcloud beta sql import sql