I want to export the datastore that I have running in App Engine into my local "standalone" version of the application. Anyone know how I can do that?
I've been looking around in the App Engine dashboard but can't find it.
Check out the docs on uploading and downloading data.
Gobo-Tools is designed for such tasks
It seems that there is no separate doc for java version of this except that it is said to do with com.google.apphosting.utils.remoteapi.RemoteApiServlet in the doc Nick provided.
Tip: If you have a Java app, you can use the Python appcfg.py tool by installing the Java
version of the remote_api handler, which is included with the Java runtime environment.
The handler servlet class is com.google.apphosting.utils.remoteapi.RemoteApiServlet.
Here is some relevant code example for java version of this API usage GAE/J datastore backup
Related
I am using Google Cloud Storage and I want to serve scaled images from it, Python 2 version of Google App Engine supported it via Images API but with Python3, they removed that API.
https://cloud.google.com/appengine/docs/standard/python3/python-differences
Cannot understand the intension behind removing such an import feature, upgrading to Python3 in Google Cloud environment sounds like a downgrade to me.
As you said, the proprietary App Engine APIs are not available in Python3.7. The main reason is because GCP is unbundling App Engine and now, you are no longer dependent on these APIs.
Currently, there are some third parties alternative solutions. In your specific case, and based on GCP documentation, I think that you can try to use Imgix or Rethumb.
Seems like Google is planning on adding it back to Python 3:
https://cloud.google.com/appengine/docs/standard/python3/services/access
To reduce runtime migration complexity, Google Cloud now supports a set of App Engine bundled services and their associated APIs on second-generation runtimes, which include Python 3, Java 11, and Go 1.12 or higher. Your app can call bundled services APIs for second-generation runtimes through language-idiomatic libraries.
Tried
Subscribed trial for GoogleAppEngine.
1. INSTALLED GOOGLE APP ENGINE SDK
2. Downloaded the sample Java started code and deployed it. Working fine.
3. Used $appcfg.sh -A <appname> update target/appengine-try-java-1.0 to deploy
4. In this case, its a folder with all the webapp related stuffs
Question
In my case, I have a spring boot application which generates a jar file. It runs with a embedded container and I believe Google may have an alternate to deploy using Docker or some other way. But how?
There is no pointer or any details on how to run this in Google managed platform as far as I searched.
Any help or reference to documentation!! Alternates??
You can now use Google App Engine Java Flexible Environment - Java 8 Runtime:
https://cloud.google.com/appengine/docs/flexible/java/dev-java-only
It is Docker based
UPDATE:
You can now use Java 8 in App Engine Standard Environment:
Tutorial:
https://codelabs.developers.google.com/codelabs/cloud-app-engine-springboot/index.html
Example:
https://github.com/GoogleCloudPlatform/getting-started-java/tree/master/appengine-standard-java8/springboot-appengine-standard
Blog post:
https://cloudplatform.googleblog.com/2017/09/Java-8-on-App-Engine-Standard-environment-is-now-generally-available.html
Google App Engine still uses Servlet 2.5 that is below the requirements of Spring Boot (i.e. Servlet 3.0).
There is a way to workaround that, check the documentation for more details
Spring Boot requires Servlet 3.0 which GAE does not have. WorkAround is to have a "spring-boot-legacy" dependency. You can check further how to implement: https://github.com/scratches/spring-boot-sample-gae
Currently i try to connect (via JPA/Datanucleus) with an application, hosted by Google App Engine, to the database service of database.com (Salesforce)
After many hours of reading and trying, i could not find any solution.
So, is it even possible??
Some Information....
Database.com provides JPA: http://forcedotcom.github.com/java-sdk/jpa-provider, but i could not found any sdk on this side, but i found a jar-file hosted by grepcode http://grepcode.com/snapshot/repo1.maven.org/maven2/com.force.sdk/force-jpa/22.0.7-BETA/ - Possibly there is currently no official release ...
The problem is that this SDK from Salesforce needs datanucleus 2.0, but Google App Engine includes only datanucleus 1.1.5. So i try to update theses libaries and found this.... code.google.com/p/datanucleus-appengine/ . I tried a few hours to replace the old libaries and to use the newer, but unsuccessfully. The error was that eclipse could not find some libaries, because the newer libaries, provided by the side above, have different package structure -
I am thankful for any help...
Kotake
The official release of the JPA provider is available on Maven Central:
http://search.maven.org/remotecontent?filepath=com/force/sdk/force-jpa/22.0.7-BETA/force-jpa-22.0.7-BETA.jar
The external connection restriction won't be a limiting factor because the JPA adapter connects to Database.com over https using a SOAP API.
I can't speak to the challenges around getting DN 2.0 running on GAE. Perhaps GAE support can help with that?
As stated here in the App Engine docs, you cannot make direct connections to external servers from GAE (except over http or https using the app engine specific url APIs). You will need to find some other way to get data out of your remote database.
This link describes how to solve your problem:
How to use Force.com Database SDK on Google APP Engine
(He has updated the Saleforce SDK source code to allow it to work without problem on GAE.)
I'm trying to deploy one of my java apps in GAE and I have used MongoDB. Unfortunately GAE doesn't allow me to create databases, however it suggests using Google Datastore. Are there any plugins or add-ons to use MongoDB.
You can't run MongoDB on GAE. You need to use the Google datastore.
Matt is right. If you want to deploy to Google's servers you can't use Mongo. If you are interesting in running your own server(s), check out AppScale.
If you really want to use MongoDB anyway, you'll have to find a third-party host that provides a REST interface through which you can make your transactions. I've personally tried and recommend MongoLab on App Engine. Then, in your code, use an HttpUrlConnection object to send/receive requests if you're doing it with Java.
I think you could deploy your app on app engine and create a separate vm instance in google compute engine that would have mongo installed, then you plug your GAE app on that vm for the db connection. This would allow you to keep all your app in the google cloud. See https://cloud.google.com/solutions/mongodb/ and http://docs.mongodb.org/ecosystem/platforms/google-compute-engine/
A lot of things have changed since this question has been asked, as of June 2021, you can use MongoDB Atlas with Google App Engine Standard running on Java 8 environment. I built my App with the Ktor framework that runs on App Engine and interacts with databases on MongoDB Atlas.
if you're still looking for an answer to this you might want to check this project that did exactly the same but in reverse, it will surely help you out with what you want to do.
http://code.google.com/appengine/articles/django-nonrel.html
you can use mongo, only if have something like on mongolab then use pymongo to connect and most important thing you need to enable socket api from gae dashboard.
it worked for me thanks
I've playing around with Google App Engine and Google Datastore for a while now and I am facing the need to take regular backups of my stuff up on the cloud.
Is there any sort of general purpose tool that allows you to download all your data from a specific instance of google-datastore and restore it to another one?
If so, please enlighten me, if not - someone should do it!
You can use the BulkLoader that is described in the Google Appengine Docs
There is an opensource application available that I developed called "GAE datastore backup utility." It allows you to backup and restore your GAE entities through a GUI. It keeps track of your applications and your application's entities. It's currently only for Windows and Python based GAE apps but it sounds like something you are looking for. I see that you are looking for a solution for Java based apps. I will look into supporting this language in the next release.
http://code.google.com/p/gae-datastore-backup-utility/
Follow this tutorial for Exporting and Importing Entities: https://cloud.google.com/datastore/docs/export-import-entities
Windows:
set BUCKET=YOUR_BUCKET_NAME[/NAMESPACE_PATH]
gcloud datastore export --namespaces="(default)" gs://%BUCKET%
gcloud datastore import gs://%BUCKET%/[PATH]/[FILE].overall_export_metadata
Linux:
BUCKET="YOUR_BUCKET_NAME[/NAMESPACE_PATH]"
gcloud datastore export --namespaces="(default)" gs://${BUCKET}
gcloud datastore import gs://${BUCKET}/[PATH]/[FILE].overall_export_metadata
You may have a look at the following site:
http://aralbalkan.com/1837
It is about the backup and restore of the datastore.
http://code.google.com/appengine/articles/gae_backup_and_restore.html
I describe bulkloader.py no-config dump/restore in What's the best way to back up data on Google App Engine?
After years, this came out as a feature of the Datastore Administration in the app-engine dashboard, still experimental but still good news!