Skip to content

Firestore clone support#9262

Merged
rwhogg merged 1 commit intofirebase:masterfrom
rwhogg:rh-firestore-clone
Oct 21, 2025
Merged

Firestore clone support#9262
rwhogg merged 1 commit intofirebase:masterfrom
rwhogg:rh-firestore-clone

Conversation

@rwhogg
Copy link
Copy Markdown
Contributor

@rwhogg rwhogg commented Oct 6, 2025

Description

Add support for Firestore Database Clone

Scenarios Tested

  • Clone database without specifying timestamp
  • Clone database with specified timestamp
  • Clone to database that already exists (error)
  • Clone to database with explicit Google-default encryption
  • Clone to database with explicit keep-the-same-encryption config (the default)
  • Clone to database with explicitly chosen KMS key
  • Specify KMS key without explicitly choosing CMEK encryption (error)
  • Specify customer-managed encryption without picking a CMEK key (error)

Sample Commands

  • firebase firestore:databases:clone projects/myproject/databases/original-db projects/myproject/databases/clone (chooses most recent available snapshot)
  • firebase firestore:databases:clone projects/myproject/databases/original-db projects/myproject/databases/clone2 --snapshot-time 2025-10-06T10:00:00Z (uses selected snapshot time)
  • firebase firestore:databases:clone projects/myproject/databases/original-db projects/myproject/databases/db-with-same-encryption --snapshot-time 2025-10-06T10:00:00Z --encryption-type USE_SOURCE_ENCRYPTION
  • firebase firestore:databases:clone projects/myproject/databases/original-db projects/myproject/databases/db-with-kms-encryption --snapshot-time 2025-10-06T10:00:00Z --encryption-type CUSTOMER_MANAGED_ENCRYPTION --kms-key-name projects/myproject/locations/us-central1/keyRings/testkeyring/cryptoKeys/k1
  • firebase firestore:databases:clone projects/myproject/databases/original-db projects/myproject/databases/db-with-google-managed-encryption --snapshot-time 2025-10-06T10:00:00Z --encryption-type GOOGLE_DEFAULT_ENCRYPTION
@rwhogg rwhogg marked this pull request as ready for review October 6, 2025 15:39
@rwhogg rwhogg force-pushed the rh-firestore-clone branch 3 times, most recently from 224e9f8 to 9bb892b Compare October 7, 2025 13:38
@rwhogg rwhogg requested a review from joehan October 7, 2025 13:39
Copy link
Copy Markdown
Member

@joehan joehan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits and suggestions, but this mostly lgtm

@rwhogg rwhogg force-pushed the rh-firestore-clone branch from 9bb892b to 7acd3bc Compare October 7, 2025 19:58
@rwhogg rwhogg requested a review from joehan October 7, 2025 19:59
@rwhogg rwhogg force-pushed the rh-firestore-clone branch from 7acd3bc to 983e3e7 Compare October 7, 2025 20:05
Copy link
Copy Markdown
Member

@joehan joehan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a CHANGELOG entry, but LGTM otherwise

@rwhogg rwhogg force-pushed the rh-firestore-clone branch from 983e3e7 to 448581b Compare October 16, 2025 20:00
@rwhogg rwhogg enabled auto-merge (squash) October 16, 2025 20:01
@rwhogg rwhogg force-pushed the rh-firestore-clone branch 7 times, most recently from 67c975a to 15cd04d Compare October 20, 2025 21:24
@rwhogg rwhogg force-pushed the rh-firestore-clone branch from 15cd04d to 52970af Compare October 21, 2025 21:39
@rwhogg rwhogg merged commit 82f37b4 into firebase:master Oct 21, 2025
44 checks passed
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions Oct 21, 2025
@rwhogg rwhogg deleted the rh-firestore-clone branch October 21, 2025 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants