Reputation: 15149
Each time I rebuild local GAE application I loose my data and then have to reinitialise empty database. This can be very time consuming, especially if there are a lot of entity types.
How can I preserve data between rebuilds?
Upvotes: 0
Views: 98
Reputation: 1270
You can configure the dev server (via JVM options) to store blobstore data and datastore data in a different location and thus it will not be wiped out.
A convenient way to preload data in development environment datastore
Upvotes: 1
Reputation: 16890
What exactly do you do to rebuild your app? Unless the file holding the data is explicitly cleared by this procedure it should be preserved. Are you perhaps using Windows and an old SDK? In SDK 1.6.3 and 1.6.4 there was a problem where if you stop the app in the launcher it would wipe the data (well, in fact it would just never write it in the first place, but it would be preserved in memory). This has been fixed with the 1.6.5 SDK.
Upvotes: 1
Reputation: 15149
The solution I found was simply to take a copy of the generated DB before rebuild and then to put it back afterwards.
To save you time it is located here:
...\out\artifacts\...\WEB-INF\appengine-generated\local_db.bin
Basically, find appengine-generated folder in your build output location and take a copy of it.
Upvotes: 1