#17 new
Jonathan Saggau

Can't re-upload all data from backup

Reported by Jonathan Saggau | February 26th, 2009 @ 12:15 PM

I'm trying to get a local copy of the data on the live appspot application loaded into the dev_appserver environment on my local machine.

I've downloaded the entire contents of openradar using the included nukefile (nu rocks) and stored the resulting json to disk. I've added api in main.py based on the already present uploading of radars code to allow the upload of comments and written a little python to upload the radars and comments into the locally running dev server. All is working except threaded comments and users.

One can't really get around the users problem on the local machine as the set of users google is using is, well, the set of users that google is using. That's not such a big deal for local development (though I think I might have a way around that brewing).

The comment.is_reply_to.key().id() that is exported when downloading the json is the read-only unique ID of the unique key that is assigned by app engine when the comment is created. It's not possible as far as I can tell, without modifying the model, to recreate comment threads when re-uploading data.

Possible solution: I can re-upload radars because they are referenced by apple's radar numbers in the number attribute and not by the google app engine unique ID. Perhaps we could create an identifying unique (UUID perhaps?) attribute on comments that is independent of comment.is_reply_to.key().id() so that threaded comments can be downloaded and then re-uploaded with the threaded is_reply_to relationships intact.

This will improve portability and make it easier for those who wish to hack locally on some "real" data.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Open Issue Tracker

Pages