I am running a daily scheduled backup of my datastore.. Is is possible to programtically disable datastore writes when this this scheduled backup is being executed? And then enable it once it's done?
No, you can't currently (13 Jun 2013) disable datastore writes programmatically. If your app is checking the capabilities API you could wrap that as described in Google App Engine Datastore Writes: How to enable/disable read-only mode remotely? but that approach is unavoidably prone to a race condition (you might check the capability just before it gets disabled).
Although parts of the documentation suggest you should set your application to read-only mode during backups and restores, in practise it should be fine to do a backup while the app is still running, as long as the app is making appropriate use of transactions to ensure consistency. Other parts of the docs such as the article on scheduled backups don't suggest this is necessary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With