A Cloud Engineer needs to manually export a Cloud SQL for PostgreSQL database to a Cloud Storage bucket for offline archiving using the Google Cloud CLI. Arrange the steps in the correct procedural order to successfully complete this export operation.
- 1Create a destination Cloud Storage bucket to hold the database export file.
- 2Grant the Cloud SQL instance service account storage write permissions on the Cloud Storage bucket.
- 3Execute the `gcloud sql export sql` command specifying the database instance, database name, and Cloud Storage URI.
- 4Verify that the exported dump file exists in the target Cloud Storage bucket.
Cevap
The correct sequence of steps is: 1) Create a destination Cloud Storage bucket, 2) Grant the Cloud SQL instance service account storage write permissions on the bucket, 3) Execute the gcloud sql export sql command, and 4) Verify that the exported dump file exists in the target bucket.
To export a Cloud SQL database to Google Cloud Storage, you must first ensure the target bucket exists. Next, you must grant the Cloud SQL instance's automatically created service account appropriate IAM write permissions on that bucket. After IAM permissions are established, you issue the `gcloud sql export sql` command. Finally, you confirm the operation's success by checking for the exported file in the Cloud Storage bucket.
Adım Adım Çözüm
Anahtar Kavram
Exporting Cloud SQL Databases to Cloud Storage