Populate a local Datastore based on appspot Datastore - google-app-engine

I have populated a datastore and have webapp2 serving up some graphs to display the data when I go to my deployed appspot site. However, for development purposes I would like to be able to run an instance of Google App Engine locally against the same data. I have read the Google Docs about backup and restore (https://cloud.google.com/appengine/docs/adminconsole/datastoreadmin?csw=1#backup_and_restore) but that doesn't seem to provide any options for populating seed data to the local instance.
Does anyone know how to either export data from the deployed datastore and import it into the local version or to point a local instance of webapp2 to the deployed datastore for read-only transactions?

Here i found a very good way to take dump of data and populate it , in your local database.
http://gbayer.com/big-data/app-engine-datastore-how-to-efficiently-export-your-data/
You have to take the dump , download it , and then read the entities and save them in your local database

Related

Local or development Google Cloud Firestore database with App Engine

In my previous App Engine projects I used the Cloud Datastore, and during development I could debug my app on the local server and it would use a local database, stored in a file I could wipe out if I wanted to start from scratch.
With Cloud Firestore, even when I'm running locally it's talking to my real cloud database. Is there still a local option? Note that I'm not talking about client-side persistence, I'm talking about a mock development DB.
Google recommends setting up multiple projects if you want dev/staging/production, and I'm guessing that's the answer, but I'd like to know before adjusting my workflow.
I think (now only a few months later) that this is supported. When I run my app, using dev_appserver.py, I see a message
INFO 2019-02-14 00:08:56,030 admin_server.py:150] Starting admin server at: http://localhost:8000
Going to that URL shows me all the instances I have been seeing. These seem to persist even when the dev_appserver is restarted. Reading this and other posts I was convinced that my development was using my actual cloud database, but going to https://console.firebase.google.com/project/myproject was showing completely different content.
Just to be sure (because google is google and everything is named the same) I'm using an appengine app and a gcloud project, storing things to Firestore using ndb.Models...
Oh, but careful. My app I was also using the cloudstorage (blobstore?) and even though the localhost:8000 showed these, THESE WERE THE REMOTE INSTANCES.
There is a local emulator for Firestore when using the Firebase CLI:
https://firebase.google.com/docs/rules/emulator-setup

Is it possible to integrate App Engine and Neo4j on local machine?

Is there a way to run app engine and neo4j in one application locally? What I want to do is fetch app engine datastore entities and create my neo4j graph database using it. I checked app engine documentation where they have specified what all external libraries it supports. Right now, I am running into an issue where my csv stream response is more than 32 MB. Also, I can't use Compute Engine. Pricing is the issue and I am making too many requests!

GAE datastore sync

This question really follows on from this question:
GAE syncing content between the server and the local development machine
If an item is added to the Datastore on the local development machine, will this item then be added to the apps online Datastore?
Or is all data added locally erased before deployment and the data on the online Datastore unchanged?
Your local data is independent of the datastore, there is no syncing of data. The services like datastore, blobstore and so on are emulated locally by stubs.

Google app engine only as database store

I am currently developing a php application hosted in my server. I want to store the database data in a more secure place rather than my own server. Can I use google app engine only to store and retrieve data without creating a java or python app? If thats possible how can I access data? Using a special service or I can directly connect to db like connecting to a mysql server and execute sql commands lik select, insert etc?
Storing your data on App Engine will not magically grant you extra security. If an attacker compromises your server, they will be able to compromise the interface you have to your datastore and do whatever they wish.
A much better approach would be to learn best-practices for secure web development, and endeavour to ensure your app will not be compromised.
They have a module called remote_api, but it has some restrictions. Check it out:
http://code.google.com/intl/fi-FI/appengine/articles/remote_api.html
There is no direct way to access datastore in App engine. I assume you use mysql or other relational database for your php application. But app engine provide a schemaless object datastore. In that case you need some java or python app for preparing data to store in datastore. Check below links as well.
http://code.google.com/appengine/docs/java/datastore/
https://stackoverflow.com/questions/1466420/google-app-engine-external-database

Is there a local Google App Engine data viewer?

I want to use google's online GAE data viewer offline...
Is there some bunch of python code to display all my local data and even schema?
Yes, go to http://localhost:8000/_ah/admin (supposing you're running your local instance with dev_appserver.py).
NOTE: when the app is being deployed locally, it logs to which port the admin page is being binded

Resources