Reputation: 3088
I just had a colleague blow away a table by accidentally running a unit test in an environment with a real database (which is a good opportunity to add a sanity check to that particular piece of code ;- )
No problem, I restored my database from backup using instructions here. The problem is that my newly created read replica is lacking the restored data. The data IS present in the master, it's just missing in the new read replica (yes I deleted the read replica before restoring on the master)
Upvotes: 0
Views: 317
Reputation: 3088
The key is this language in the replica documentation:
"Before you can create a Cloud SQL read replica of a Cloud SQL instance... At least one backup must have been created since binary logging was enabled."
Which indicates that read replicas are created from the most recent backup, not from the master itself as might be expected. To resolve this problem one must do a manual backup following database repair prior to creating new read replicas.
Upvotes: 1