Hi all,

I use Java to develop my web application on GAE, and I need to restore
and backup the data stored in Datastore.
GAE docs have a tutorial that how to do that with appcfg.py.
Is it possible to use appcfg.py even if I use JAVA?

Here is the command that I try to restore the data saved in list.csv
appcfg.py  upload_data --config_file=~/pythgt.py --filename=~/
list.csv  --kind=Viewspot --auth_domain=http://myapp.appspot.com/ ~/
datastore/

The result:
  File "./pythgt.py", line 4, in <module>
    import models
ImportError: No module named models

The path of "~/datastore/" is an empty python project which is added
"remote_api" configuration in app.yaml

//======  pythgt.py ======
import datetime
from google.appengine.ext import db
from google.appengine.tools import bulkloader
import models

class ViewspotLoader(bulkloader.Loader):
  def __init__(self):
    bulkloader.Loader.__init__(self, 'Viewspot',[
('name', str),
('address', str),
('viewspotType', str),
('tel', str),
('officialSite', db.Link),
('password', str),
('ssid', str),
('updateDate',lambda x: datetime.now()),
('locationLat', double),
('locationLng', double)
])

loaders = [ViewspotLoader]


//======  list.csv ======
CAFE,my place,RT,02-1234-1234,http://www.cafe.com/,kklikdlsf,myPlan,,
0.0,0.0
Bravo,theplace,RT,02-5678-5678,http://www.beer.com/,123456,myBoss,,
0.0,0.0

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to