1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-08 02:25:19 +00:00

gcloud: Thu Sep 5 09:45:25 UTC 2024

This commit is contained in:
Automated 2024-09-05 09:45:25 +00:00
parent afbe8a5afb
commit 78a4d78e9e
44 changed files with 416 additions and 342 deletions

View file

@ -5,7 +5,9 @@ NAME
SYNOPSIS
gcloud firestore databases restore
--destination-database=DESTINATION_DATABASE
--source-backup=SOURCE_BACKUP [GCLOUD_WIDE_FLAG ...]
--source-backup=SOURCE_BACKUP
[--encryption-type=ENCRYPTION_TYPE : --kms-key-name=KMS_KEY_NAME]
[GCLOUD_WIDE_FLAG ...]
EXAMPLES
To restore a database from a backup.
@ -14,6 +16,15 @@ EXAMPLES
--source-backup=projects/PROJECT_ID/locations/LOCATION_ID/\
backups/BACKUP_ID --destination-database=DATABASE_ID
To restore to a CMEK-enabled database.
$ gcloud firestore databases restore \
--source-backup=projects/PROJECT_ID/locations/LOCATION_ID/\
backups/BACKUP_ID --destination-database=DATABASE_ID \
--encryption-type=customer-managed-encryption \
--kms-key-name=projects/PROJECT_ID/locations/LOCATION_ID/\
keyRings/KEY_RING_ID/cryptoKeys/CRYPTO_KEY_ID
REQUIRED FLAGS
--destination-database=DESTINATION_DATABASE
Destination database to restore to. Destination database will be
@ -40,6 +51,55 @@ REQUIRED FLAGS
--source-backup=projects/PROJECT_ID/locations/us-east1/backups/\
cf9f748a-7980-4703-b1a1-d1ffff591db0
OPTIONAL FLAGS
The encryption configuration of the new database being created from the
backup. If not specified, the same encryption settings as the backup will
be used.
To create a CMEK-enabled database:
$ gcloud firestore databases restore \
--encryption-type=customer-managed-encryption \
--kms-key-name=projects/PROJECT_ID/locations/LOCATION_ID/\
keyRings/KEY_RING_ID/cryptoKeys/CRYPTO_KEY_ID
To create a Google-default-encrypted database:
$ gcloud firestore databases restore \
--encryption-type=google-default-encryption
To create a database using the same encryption settings as the backup:
$ gcloud firestore databases restore \
--encryption-type=use-source-encryption
--encryption-type=ENCRYPTION_TYPE
The encryption type of the destination database. ENCRYPTION_TYPE must
be one of: use-source-encryption, customer-managed-encryption,
google-default-encryption.
This flag argument must be specified if any of the other arguments in
this group are specified.
--kms-key-name=KMS_KEY_NAME
The resource ID of a Cloud KMS key. If set, the database created will
be a Customer-Managed Encryption Key (CMEK) database encrypted with
this key. This feature is allowlist only in initial launch.
Only a key in the same location as this database is allowed to be
used for encryption. For Firestore's nam5 multi-region, this
corresponds to Cloud KMS location us. For Firestore's eur3
multi-region, this corresponds to Cloud KMS location europe. See
https://cloud.google.com/kms/docs/locations.
This value should be the KMS key resource ID in the format of
projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
How to retrieve this resource ID is listed at
https://cloud.google.com/kms/docs/getting-resource-ids#getting_the_id_for_a_key_and_version.
This flag must only be specified when encryption-type is
customer-managed-encryption.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,