From b39b125f3b20db1b10951124e614d99b04725be2 Mon Sep 17 00:00:00 2001 From: "K.B.Dharun Krishna" Date: Thu, 7 Dec 2023 20:31:19 +0530 Subject: [PATCH] gcloud-{logging-logs-list, sql-export-sql}: add page (#11695) Signed-off-by: K.B.Dharun Krishna Co-authored-by: danielsagie <137056545+danielsagie@users.noreply.github.com> --- pages/common/gcloud-logging-logs-list.md | 37 ++++++++++++++++++++++++ pages/common/gcloud-sql-export-sql.md | 29 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 pages/common/gcloud-logging-logs-list.md create mode 100644 pages/common/gcloud-sql-export-sql.md diff --git a/pages/common/gcloud-logging-logs-list.md b/pages/common/gcloud-logging-logs-list.md new file mode 100644 index 000000000..961e2ff2e --- /dev/null +++ b/pages/common/gcloud-logging-logs-list.md @@ -0,0 +1,37 @@ +# gcloud logging logs list + +> List logs in a Google Cloud project. +> Useful for identifying available logs for monitoring and analysis. See also: `gcloud`. +> More information: . + +- List all logs in the current project: + +`gcloud logging logs list` + +- List all logs for a specific log bucket and location: + +`gcloud logging logs list --bucket={{bucket_id}} --location={{location}}` + +- List all logs for a specific view in a log bucket: + +`gcloud logging logs list --bucket={{bucket_id}} --location={{location}} --view={{view_id}}` + +- List logs with a filter expression: + +`gcloud logging logs list --filter="{{expression}}"` + +- List a specified number of logs: + +`gcloud logging logs list --limit={{number}}` + +- List logs sorted by a specific field in ascending or descending order (`~` for descending): + +`gcloud logging logs list --sort-by="{{field_name}}"` + +- List logs sorted by multiple fields: + +`gcloud logging logs list --sort-by="{{field1}},~{{field2}}"` + +- List logs with verbose output, showing additional details: + +`gcloud logging logs list --verbosity=debug` diff --git a/pages/common/gcloud-sql-export-sql.md b/pages/common/gcloud-sql-export-sql.md new file mode 100644 index 000000000..5fbea44bc --- /dev/null +++ b/pages/common/gcloud-sql-export-sql.md @@ -0,0 +1,29 @@ +# 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: . + +- 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`