5

I'm using GoogleAppEngineLauncher (GAEL) on Mac OS X. The state of the datastore for my application is persisted between server restarts and even GAEL restarts, but if I reboot, the datastore is reset. Is there a setting to prevent this reset, or is there a tmp file somewhere that I can save off?

David Underhill
  • 15,896
  • 7
  • 53
  • 61
byamabe
  • 1,421
  • 1
  • 12
  • 19

1 Answers1

10
  1. Click on Edit -> Application Settings
  2. Under 'Extra Flags', enter "--datastore_path=/Users/yourname/somewhere"
  3. Enjoy your now-permanent datastore.
Nick Johnson
  • 100,655
  • 16
  • 128
  • 198
  • 1
    Nick - I tried this on Windows and it doesn't work (at least, it doesn't work when I launch using Eclipse or GAE Launcher). I realize I'm not providing you much information to go with. I would very much appreciate your help, so please let me know if there is any other information you could use from me to help troubleshoot this issue. – cv12 Apr 18 '12 at 05:22
  • @cv12 Well, you could start by explaining what you mean by 'doesn't work'. What happens when you try? And did you use a valid path for a windows filesystem, instead of the Macos one in my answer? – Nick Johnson Apr 18 '12 at 05:30
  • Nick - The extra flag I used was "--datastore_path=G:\ds". This is an existing folder I created specifically to contain the files that would persist the local datastore. By "doesn't work", I mean that (1) I use the application which adds entities to the datastore, (2) I terminate the development server (by stopping it using the GAE Launcher on Windows), (3) I restart the development server (using the GAE Launcher again) and (4) the datastore is empty at this point and no files are written into G:\ds which I specified as the datastore_path. I have this problem in 1.6.4 but not in 1.6.3. – cv12 Apr 18 '12 at 15:17
  • The argument to `--datastore_path` is a file, not a directory. But there's a bug in 1.6.4 which may be impacting you and causing this. – Nick Johnson Apr 19 '12 at 03:04
  • Nick - Thanks very much for responding so quickly. How do I create the file to supply to --datastore_path? Do I begin by creating an empty file? Do you recommend that I just wait for the 1.6.5 release and not waste more time on trying to address this with the 1.6.4 SDK? Finally, do you know if this bug will already fixed by the time 1.6.5 is released? – cv12 Apr 19 '12 at 15:00
  • @cv12 You don't need to create the file; just specify a valid filename. And see [this bug](http://code.google.com/p/googleappengine/issues/detail?id=7244) for details. – Nick Johnson Apr 20 '12 at 00:19
  • Nick - Thanks for pointing me to the specific bug. Using the "--use_sqlite" flag solved the persistence issue. I don't know what the default alternative that didn't work was. I assume there will be a more permanent solution that doesn't require the extra flag in a future release, but this fix is painless enough. – cv12 Apr 25 '12 at 03:42