Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrating Small App to High Replication Datastore

The current recommendation from google is that all apps start migrating to the high replication datastore. My app is small and still in development. My understanding is that the more data my app accumulates the more involved the transition process will be. So I've decided to migrate ASAP (while I still only have 56k of user data).

I followed the documentation on downloading all data from a master-slave app. I have the downloaded data. I have deployed my app to high replication. When I try to use the upload command (from the same section in the documentation) however I get an error. Here's what I'm trying to run:

C:\Users\Hank\Documents\Aptana Studio 3 Workspace\hanksandbox>appcfg.py upload_data --application=essayhost --kind=User --filename=sandboxed .

and the error I get:

  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\datastore\datastore_rpc.py", line 1048, in check_rpc_success raise _ToDatastoreError(err)
google.appengine.api.datastore_errors.BadRequestError: app s~essayhost cannot access app essayhost's data

That's the last line of a very long traceback. If you need more let me know. If you know of a good, thorough, walkthrough for this process please link it. Most of what I'm finding is a little out of my depth.

P.S. Anyone know how to upload all kinds at once?

like image 582
Hank Avatar asked Jun 04 '11 21:06

Hank


2 Answers

I believe that the fix is to specify the full app id for your high replication app in the --application flag. In your case the full app id is: s~essayhost. App Engine tries to hide the s~ prefix, but doesn't always succeed.

like image 85
frew Avatar answered Oct 29 '22 01:10

frew


I ran into the same issue as you. This is how I fixed it:

appcfg.py upload_data --config-file=bulkloader.yaml --filename=links.csv --kind=Link --application=s~myapp --url=http://myapp.appspot.com/_ah/remote_api

I'm currently migrating my data from my VPS to Google App Engine, 60k rows of data.

Edit: You can't migrate all kinds at once; you could try making a batch script or something to do it for you, but it's not that hard to type it all.

like image 34
3 revs Avatar answered Oct 29 '22 00:10

3 revs