I recently enabled AppEngine's Datastore Admin. I do not understand the instructions on how to copy my data to another app.
Note: The target application must enable remote_api and must include this application’s ID in its HTTP_X_APPENGINE_INBOUND_APPID list.
WARNING This application’s data is writable. We can only guarantee a consistent copy when the data being copied is read-only. Note: Blobs (binary data) will not be copied.
To enable the remote_api I included the following in the app.yaml:
builtins:
- remote_api: on
I have no idea what HTTP_X_APPENGINE_INBOUND_APPID is, and a Google search yields no results....any ideas?
The datastore copy feature is currently available only for Python applications.
If you are using GAE for Java you must do the following steps:
Notes: Assuming you are copying from app example1.appspot.com
to app example2.appspot.com
and your Java WEB-INF
app folder is located in /Users/admin/src/main/webapp/WEB-INF
WEB-INF
folder: app.yaml
WEB-INF
folder: appengine_config.py
appcfg.py -A example2 update **/Users/admin/src/main/webapp/WEB-INF
example1
datastore admin view and put: datastore-admin.example2.appspot.com/_ah/remote_api
app.yaml:
application: example2
version: datastore-admin
runtime: python
api_version: 1
builtins:
- remote_api: on
- datastore_admin: on
appengine_config.py:
remoteapi_CUSTOM_ENVIRONMENT_AUTHENTICATION = (
'HTTP_X_APPENGINE_INBOUND_APPID', ['example1'])
If you are using java and already tried this and its not working(i had the same problem) i added:
<servlet>
<display-name>Remote API Servlet</display-name>
<servlet-name>RemoteApiServlet</servlet-name>
<servletclass>com.google.apphosting.utils.remoteapi.RemoteApiServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>RemoteApiServlet</servlet-name>
<url-pattern>/remote_api</url-pattern>
</servlet-mapping>
in web.xml and update with this command: appcfg.py -A appid update /yourappfolder/war/WEB-INF
Strange but after i did that it worked.
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