Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

34
gcloud-sql-export-sql Normal file
View File

@@ -0,0 +1,34 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# gcloud sql export sql
> Export data from a Cloud SQL instance to a SQL file in Google Cloud Storage.
> Useful for creating backups or migrating data. See also: `gcloud`.
> More information: <https://cloud.google.com/sdk/gcloud/reference/sql/export/sql>.
- Export data from a specific Cloud SQL instance to a Google Cloud Storage bucket as a SQL dump file:
`gcloud sql export sql {{instance}} gs://{{bucket_name}}/{{file_name}}`
- Export data asynchronously, returning immediately without waiting for the operation to complete:
`gcloud sql export sql {{instance}} gs://{{bucket_name}}/{{file_name}} --async`
- Export data from specific databases within the Cloud SQL instance:
`gcloud sql export sql {{instance}} gs://{{bucket_name}}/{{file_name}} --database={{database1,database2,...}}`
- Export specific tables from a specified database within the Cloud SQL instance:
`gcloud sql export sql {{instance}} gs://{{bucket_name}}/{{file_name}} --database={{database}} --table={{table1,table2,...}}`
- Export data while offloading the operation to a temporary instance to reduce strain on the source instance:
`gcloud sql export sql {{instance}} gs://{{bucket_name}}/{{file_name}} --offload`
- Export data and compress the output with `gzip`:
`gcloud sql export sql {{instance}} gs://{{bucket_name}}/{{file_name}}.gz`