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 team manages a high-throughput Cloud SQL for MySQL Enterprise edition instance from early 2023 that stores Point-in-Time Recovery (PITR) binary logs on disk with a 7-day retention period. Accumulated binary logs are increasing local disk consumption and storage costs.
You must optimize this configuration to meet the following requirements:
Which approach should you implement?
Cloud SQL Enterprise Plus edition provides enhanced performance capabilities, a higher availability SLA, and extended PITR log retention of up to 35 days (defaulting to 14 days). Performing an in-place upgrade from Enterprise edition automatically initiates a switch of on-disk PITR logs to Cloud Storage.
SWITCHING_TO_CLOUD_STORAGE), Cloud SQL blocks modifications to expire_logs_days and binlog_expire_logs_seconds.expire_logs_days from 7 to 1 all at once forces a simultaneous purge of accumulated binary logs, risking disk I/O contention.transactionLogRetentionDays setting to finish.SWITCHED_TO_CLOUD_STORAGE.You needed to extend your PITR window beyond 7 days (up to 35 days), accepted minimal upgrade downtime and higher edition costs, and waited until the switch finished before gradually reducing expire_logs_days by one day per day.
The transactionLogRetentionDays setting controls the total PITR recovery window—how many days of continuous transaction logs Cloud SQL retains for second-level restores. The retainedBackups setting specifies how many daily automated backups are kept to serve as base snapshots for restores.
transactionLogRetentionDays to 1 restricts granular point-in-time recovery to only the past 24 hours. Relying on daily automated backups for days 2 through 7 only allows restoring to the exact timestamp of each daily backup, creating large Recovery Point Objective (RPO) gaps.transactionLogRetentionDays alone keeps binary logs stored on local disk rather than offloading them to Cloud Storage.retainedBackups should always be set to at least one more than transactionLogRetentionDays (e.g., 8 backups for 7 days of logs).Your recovery policy only required granular PITR for the most recent 24 hours and daily snapshot recovery for the preceding six days, and the purge occurred during a low-traffic window.
Offloading Point-in-Time Recovery (PITR) logs moves MySQL binary log archival from the instance's local persistent disk to regional Cloud Storage. Once PITR logs are managed in Cloud Storage, local binary log retention is controlled independently by MySQL database flags (expire_logs_days or binlog_expire_logs_seconds), which keep a minimal buffer on disk for replication.
gcloud CLI or Cloud SQL Admin API transitions log archival to Cloud Storage over the course of the retention period (transactionLogRetentionDays) without discarding existing on-disk logs.expire_logs_days or binlog_expire_logs_seconds gradually by one day per day avoids purging six days of binary logs simultaneously, preventing heavy disk I/O contention.mysqlbinlog.Unlike toggling PITR off and on—which restarts the database and erases existing logs—or shrinking transactionLogRetentionDays—which sacrifices granular recovery across the week—switching to Cloud Storage and gradually lowering on-disk expiration flags satisfies every availability, recovery, cost, and performance constraint.
Disabling and re-enabling Point-in-Time Recovery (PITR) forces Cloud SQL to reinitialize its binary logging configuration, placing newly generated logs into Cloud Storage. Meanwhile, the expire_logs_days flag defines the automatic expiration threshold in days for binary logs stored locally on the MySQL instance disk.
expire_logs_days to 0 disables automatic binary log expiration rather than clearing files, and Cloud SQL explicitly advises against configuring either expire_logs_days or binlog_expire_logs_seconds to 0.0 leaves binary logs on disk indefinitely until manually or externally managed.You were working on a non-production instance where losing historical PITR logs and incurring several minutes of restart downtime were acceptable, and you configured a positive value (such as 1) rather than 0 for expire_logs_days.
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