Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable datastore writes programatically when running scheduled backups?

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?

like image 609
tommi Avatar asked Nov 03 '22 22:11

tommi


1 Answers

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.

like image 88
Torne Avatar answered Nov 09 '22 08:11

Torne