A company uses Cloud SQL for MySQL to run an e-commerce application. They need to ensure that they can recover the database to any point within the last 4 days. They also want to minimize storage costs. Which configuration should they use?
Correct! Binary logging enables PITR, and setting transaction log retention to 4 days allows recovery to any point within the last 4 days.
Why this answer
Point-in-time recovery (PITR) in Cloud SQL for MySQL requires binary logging, which can be enabled with the 'log_bin' flag. The transaction log retention period can be set from 1 to 7 days. For 4-day recovery, set the retention to 4 days.
Option B is correct: enable binary logging and set the transaction log retention to 4 days. Option A is wrong because automated backups alone only restore to backup time, not any point. Option C is wrong because disabling automated backups is not necessary—automated backups are still needed for initial restore points, but PITR uses transaction logs.
Option D is wrong because point-in-time recovery is enabled by setting binary logging and retention; there is no separate 'point_in_time_recovery' flag.