Posts

Showing posts from June, 2013

Google Cloud SQL - Backup prod and restore on dev instance

To test your code in cloud sql you need a realistic data load. The best way to get this is the backup and restore your production database. Note that you need to make sure you anonymize the data sufficiently immediately after the restore to protect your customers identities. Go to google api console. https://code.google.com/apis/console/ you need to be logged in to your google account for this. Find the name of the storage bucket in cloud storage or create a new one. Go back into Cloud sql console and export data. Give the name of the file as date-prod: june-17-2013-prod Back up will take a while. Once it is completed download the file to your local machine. Decompress it, its in gzip format. This outputs both the mysql db and the required prod db. Use the following shell commands (bash) to get rid of the mysql stuff: grep -in ‘create database’ your_file_name The output gives you the line numbers of the creates (that's what the n is for, the i ig

Upgrading your Appengine SDK in eclipse

I get those warnings in the eclipse console every month or so. I normally put off the in stall until I am left with no choice. This is not healthy of course. Better to document the procedure here and not be afraid! The SDK Download latest SDK from here: https://developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Java Extract it somewhere (I created a dir within eclipse for this) : \eclipse\appengine_downloads Add the sdk in eclipse. Change the SDK version in your project and overall in eclipse. Database Driver Check for more recent connector j here: http://dev.mysql.com/downloads/connector/j/ Place it here: \eclipse\appengine_downloads\appengine-java-sdk-1.8.1\lib\impl\mysql-connector-java-5.1.25-bin.jar