How can I Share and restore cloud sql backup files across account ( project )
For those that stumble across this post 2018. It is now possible to restore cloudSQL between projects. As of this post you still need to use curl but it does work. The link below is to the mysql docs but I got it to work fine with SQL Server.
https://cloud.google.com/sql/docs/mysql/backup-recovery/restoring#projectid
Unfortunately, you cannot restore an instance using a backup created in a different project, as stated in the documentation for instance restoration:
When you are restoring a backup to a different instance, keep in mind the following restrictions and best practices:
- You cannot restore an instance using a backup taken in a different GCP project.
- ...
Maybe the following is not your specific use case, but should you replicate your instance in a new project, you should follow these steps: export your data to a SQL dump or CSV file, and then import it in a new instance in your other project. Here it is a more detailed guide on how to achieve that:
Once these steps are completed, you should have a new Cloud SQL instance with the same data as the one in the old instance at the moment of creation of the export files.
However, as I already said, this is not restoring from a backup, so you cannot recover a previous instance state into an instance in a different project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With