Tuesday, January 24, 2017

Re: [google-cloud-sql-discuss] Backup restore to different instance, in different project

Thanks for the context - use cases are really helpful for feature requests!

David

On Tue, Jan 24, 2017 at 10:35 AM, Dan Gardner <dan.gardner@baddogdown.com> wrote:
Thanks David,  I agree.  Was hoping to avoid replacing the CloudSQL backup strategy with rolling our own, but hey ho.  Just FYI our use case is that we need to segregate environments by GCP project +  I always like a daily automatic backsync data from a Production environment back through TEST,SI Ci etc.  I also like to utilise a backup / restore approach as an easy way to also verify the Production backup into the bargain.  Thx.
 

On Tuesday, 24 January 2017 18:08:31 UTC, David Newgas wrote:
Hi,

I just dug into our code and I can confirm that there is not currently a way to do this via our API. I can see that we do have an feature request open internally for this, and I will mention that you are interested in this on it. However I don't expect that it will be implemented in the short term.

The "next best thing" is to restore to an instance in the same project, export the database to GCS and then import it into an instance in another project.

Yours,
David

On Tue, Jan 24, 2017 at 6:53 AM, Dan Gardner <dan.g...@baddogdown.com> wrote:
I'm failing to restore a backup from a source instance to a target instance when each instance is in a different project.  Is this simply not supported ?

I get ambiguous permissions error from the target instance restore cmd**.   Also if I look in the console no option is offered to target instances in diff projects,  resonable I suppose for thr console.  

I guess unless you can pass a project in the restoreBackupContext json, as below, this isn't supported yet ?
  
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
     
--header 'Content-Type: application/json' \
     
--data '{ "restoreBackupContext": {"backupRunId": "[BACKUP_ID]", "instanceId": "[SOURCE_INSTANCE_NAME]", "kind": "sql#restoreBackupContext"}}' \
     
-X POST \
     https
://www.googleapis.com/sql/v1beta4/projects/[PROJECT-ID]/instances/[TARGET_INSTANCE_NAME]/restoreBackup

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/75aa9ab4-fbd2-48cb-96c3-f6ee4b2a86be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/303fedf5-292a-43ca-befc-a83a5ac5e8ee%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/CAJZK_bYkVdOt0H6_M3d--NjPkpC_e5%3DTyTr3f5Oe3d%3D4wzX-MA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment