Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Database Engineer practice bank has an additional 769 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your organization manages three production databases on Google Cloud and must enforce a 7-day Point-in-Time Recovery (PITR) policy across all of them immediately:
Which set of actions should you take to establish and manage 7-day PITR capability across all three databases?
version_retention_period to 7d via DDL, and take an immediate on-demand backup on AlloyDB with at least a 7-day recovery window.This strategy properly configures the underlying transaction log mechanisms, retention policies, and baseline backups required for Point-in-Time Recovery (PITR) across Cloud SQL for MySQL, Spanner, and AlloyDB for PostgreSQL. Each managed database service uses a distinct mechanism to track historical changes and enforce retention windows.
gcloud CLI, or the Admin API have automated backups and PITR disabled by default. You must manually enable automated backups (such as via --backup-start-time) and enable binary logging (--enable-bin-log) with 7 days of transaction log retention (--retained-transaction-log-days=7). Because transaction logs are purged once daily rather than continuously, retaining 8 automated backups (one more than the log retention days) guarantees a valid base backup exists for the entire 7-day window. Note that enabling PITR on an existing Cloud SQL instance triggers an instance restart.version_retention_period to 7d (the maximum supported duration) using an ALTER DATABASE DDL statement instructs Spanner to retain microsecond-granularity data versions for 7 days.version_time), and AlloyDB restores the cluster to a new cluster at a target timestamp.version_retention_period to 7d increases storage utilization and CPU usage for version compaction, requiring monitoring on high-overwrite workloads.It directly addresses the specific default behaviors and operational prerequisites of all three database engines without waiting for scheduled jobs or relying on incomplete log chains.
--retention-period to 7d via gcloud, and allow AlloyDB's continuous write-ahead logs to stream without taking an on-demand backup.This option assumes that Cloud SQL Enterprise edition provisions PITR automatically via Terraform, confuses Spanner's static backup retention flag with its continuous version retention period, and relies solely on WAL streaming in AlloyDB without a baseline backup.
gcloud, or the Admin API, both automated backups and binary logging remain disabled until explicitly configured.--retention-period parameter on gcloud spanner backups create controls how long a specific static backup file is stored (up to 1 year), not how long Spanner retains historical row versions for PITR. Without updating the database's version_retention_period DDL option, Spanner continues purging historical versions after just 1 hour.Cloud SQL had been upgraded to Enterprise Plus edition (or explicitly enabled in Terraform), Spanner used ALTER DATABASE to set version_retention_period to 7d, and AlloyDB had already completed a daily backup since re-enabling continuous backups.
This option attempts to isolate binary logging in Cloud SQL from automated backups, replace Spanner's native PITR with scheduled Dataflow exports, and rely on AlloyDB PITR prior to establishing a post-enablement backup.
Spanner required long-term archival beyond 7 days (where Dataflow exports or Spanner Backup and Restore are used), Cloud SQL automated backups were enabled alongside binary logging, and an AlloyDB backup had already completed.
retained-transaction-log-days to 7 without restarting the instance, rely on Spanner's default version_retention_period with stale reads, and restore AlloyDB backups in place using pg_dump and pg_restore.This option attempts to avoid downtime on Cloud SQL, use Spanner's out-of-the-box settings for stale reads, and apply standard logical PostgreSQL tools (pg_dump and pg_restore) for AlloyDB recovery.
retained-transaction-log-days does not enable automated backups or binary logging if they were disabled by Terraform defaults.version_retention_period is only 1 hour. Without explicitly increasing version_retention_period to 7d, stale reads cannot query timestamps older than one hour, failing the 7-day compliance requirement.pg_dump and pg_restore perform point-in-time logical exports and imports (typically used for small databases or manual migrations), not continuous WAL-based PITR. Furthermore, AlloyDB's managed PITR restores to a new cluster rather than overwriting an existing cluster in place, and still requires an initial backup after re-enabling continuous backups.earliest_version_time governed by version_retention_period.pg_dump only captures a snapshot at the moment the command runs, losing all transactions committed afterward.The Spanner compliance window were under 1 hour, the Cloud SQL instance had already been created with PITR enabled (avoiding a restart when only adjusting retention), and the AlloyDB requirement was a one-time logical schema/data migration rather than continuous 7-day PITR.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated