- NAME
-
- gcloud sql export bak - export data from a Cloud SQL instance to a BAK file
- SYNOPSIS
-
-
gcloud sql export bak
INSTANCE
URI
--database
=DATABASE
,[DATABASE
,…],-d
DATABASE
,[DATABASE
,…] [--async
] [--bak-type
=BAK_TYPE
; default="FULL"] [--differential-base
] [--stripe_count
=STRIPE_COUNT
] [--[no-]striped
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
- Export data from a Cloud SQL instance to a Google Cloud Storage bucket as a BAK backup file. This is only supported for SQL Server.
- EXAMPLES
-
To export data from the database
my-database
in the Cloud SQL instancemy-instance
to a BAK filemy-bucket/my-export.bak
, run:gcloud sql export bak my-instance gs://my-bucket/my-export.bak --database=my-database
- POSITIONAL ARGUMENTS
-
INSTANCE
- Cloud SQL instance ID.
URI
- The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails.
- REQUIRED FLAGS
-
--database
=DATABASE
,[DATABASE
,…],-d
DATABASE
,[DATABASE
,…]- Database from which the export is made. Information on requirements can be found here: https://cloud.google.com/sql/docs/sqlserver/admin-api/v1beta4/instances/export#exportContext.databases
- OPTIONAL FLAGS
-
--async
- Return immediately, without waiting for the operation in progress to complete.
--bak-type
=BAK_TYPE
; default="FULL"-
Type of bak file that will be exported, FULL or DIFF. SQL Server only.
BAK_TYPE
must be one of:FULL
,DIFF
. --differential-base
- Whether the bak file export can be used as differential base for future differential backup. SQL Server only
--stripe_count
=STRIPE_COUNT
- Specifies the number of stripes to use for SQL Server exports.
--[no-]striped
-
Whether SQL Server export should be striped. Use
--striped
to enable and--no-striped
to disable.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file
,--account
,--billing-project
,--configuration
,--flags-file
,--flatten
,--format
,--help
,--impersonate-service-account
,--log-http
,--project
,--quiet
,--trace-token
,--user-output-enabled
,--verbosity
.Run
$ gcloud help
for details. - NOTES
-
These variants are also available:
gcloud alpha sql export bak
gcloud beta sql export bak
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-02-06 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"lastModified": "Last updated 2024-02-06 UTC.",
"confidential": False
}