Dealing with Google App Engine development datastore

powering-leanplumI’ve been using GAE for a couple of years now, and I’ve become pretty much accustomed to its foibles, except for one: it occasionally wipes out my development datastore for no apparent reason. It always happens when I have to restart the dev. server application, and it usually happens when I switch between two of my applications. But whatever the cause, it can be really annoying. So I’ve found a workaround of sorts.

Digging thorough the development server documentation, I found two options that are making my life much easier:
Use sqlite for the local datastore.
–datastore_path=[path to datastore file]
Keep the datastore in the file specified.

By doing these two things, you can now see where GAE is keeping your datastore and you can make intermediate backups and restore them at will. You can also view your datastore using the command line sqlite client. Just add these two parameters to the Extra Flags box in your app’s info in the App Engine Launcher (or to the command line) and you’re good to go. Enjoy!