0
votes

We have an appengine application which we created about a year ago. At that time, the "Cloud Integration" option was not available in the appengine console administration page. So, to be able to talk to Google APIs and connect to Google Cloud SQL we created an API project in the old interface of the Google API Console (so that's the one at https://code.google.com/apis/console). To allow our customer to view the contents of the SQL database we created a Google Apps Script that reads the database tables and puts them in a Google spreadsheet. However, our customer has a Google Apps account for a different domain than us and is, therefore, not allowed to run the apps script. For this he needs to be a member of the cloud project managing the SQL database. In one of our more recent appengine projects we were able to simply add the customer to the project member list in the new API console (the one at https://cloud.google.com/console). This worked because when we created the appengine ID, we also used the "Cloud Integration" option.

For the older appengine application however this does not work because there's no direct link between the cloud project and the appengine application. We can only add project members belonging to the same domain as us (both in the old and new interfaces of the API console).

So what we're trying to do, is create a new cloud project using the "Cloud Integation" option in the appengine console thereby linking the appengine application directly to the cloud project. This should allow us to add our customer to the API project member list just like the more recent appengine application we created. Of course, having this new cloud project we need to migrate the SQL database from the old API project to the new one.

My question is, what's the best approach to do this?

Kind regards,

Ralph

1

1 Answers

0
votes

First, all your new Cloud Projects should be created directly from the Cloud Console (https://cloud.google.com/console > Create Project). This will include an AppEngine App and a common UI for all Google Cloud services, I believe this should be equivalent to using that "Cloud Integration" option you mentioned, but I've never used it so I'm not sure.

To migrate the data from one SQL database to another, you should use the import/export operations. You can use this to put your data on a Cloud Storage bucket.

Create the bucket:

  • Go to the Cloud Console
  • Select your new project (or create a new one).
  • Go to Cloud Storage and create a bucket.

Export data to the bucket:

  • Go to the Cloud Console
  • Select the project with the Cloud SQL Database Instance with the data you want to export.
  • Go to Cloud SQL, select the database instance with the data you want to export.
  • Click on the Export button.
  • Enter a Cloud Storage path on your newly created bucket: gs://<bucket-name>/sql_data.gz
  • Click OK and wait for the operation to finish.

You should click on the Operations tab to check that the Export operation completed successfully.

Now you can import the data from that bucket into the database instance of your new Cloud Project, just go to that database instance, click the Import button and enter the same path you used to export.