简体   繁体   English

如何在重新启动本地App Engine应用程序后避免丢失本地Google云端存储数据?

[英]How to avoid losing local Google Cloud Storage data after restarting a local App Engine app?

Now, after restarting a local App Engine app, local Google Cloud Storage data will be lost. 现在,重新启动本地App Engine应用后,本地Google云端存储数据将会丢失。 How to avoid this? 怎么避免这个?

[update] I use Java. [更新]我使用Java。 It seems the Cloud Storage data is not saved in \\war\\WEB-INF\\appengine-generated. 云存储数据似乎未保存在\\ war \\ WEB-INF \\ appengine-generated中。 When I use CTRL-C to terminate the server and restart it again, the data saved in Cloud Storage will not be found. 当我使用CTRL-C终止服务器并再次重新启动时,将无法找到保存在云存储中的数据。

Do you mean a local version of the datastore? 你的意思是数据存储的本地版本? Add a flag like this: --datastore_path=/some/path/to/store/a/local/datastore/dev_appserver.datastore . 添加如下标志:-- --datastore_path=/some/path/to/store/a/local/datastore/dev_appserver.datastore It will store a local version that will persist. 它将存储将持久存在的本地版本。 Otherwise, it overwrites the temp version every time you restart the app. 否则,每次重新启动应用程序时它都会覆盖临时版本。

Lipis is correct. 利普斯是对的。 There are other commands that may be more suitable. 还有其他命令可能更合适。 From the Command-line arguments : 从命令行参数

--storage_path=...

Path at which all local files (such as the Datastore, Blobstore files, Google Cloud    Storage Files, logs, etc) will be stored, unless overridden by --datastore_path, --blobstore_path, --logs_path, etc.

You can also specify the location of the data store in java, but it's using undocumented features. 您还可以在java中指定数据存储的位置,但它使用的是未记录的功能。

dev_appserver --property=datastore.backing_store=c:/temp/ds.bin <app directory>

To do it with Maven , please see my answer here 要使用Maven,请在此处查看我的答案

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在本地开发环境中从App Engine访问Google云端存储? - How to access Google Cloud Storage from App Engine in local development environment? 使用Junit + eclipse在本地存储Google App引擎中持久存储数据 - Persist data in local storage google app engine with Junit + eclipse 如何获取本地开发服务器中Google云存储上载文件的公共链接(Google App Engine + JAVA) - How to get public link for the uploaded file on google cloud storage in local dev server(Google App engine+JAVA) Google本地云数据存储查看器未针对App Engine Eclipse项目显示 - Google Local Cloud Datastore Viewer Not Showing For App Engine Eclipse Project 适用于Java和Google云存储的Google App Engine - Google App Engine for Java and Google Cloud Storage 如何将本地Google App Engine Python数据存储区复制到本地Google App Engine Java数据存储区? - How do I copy local Google App Engine Python datastore to local Google App Engine Java datastore? 如何使用Google App Engine(Java)创建剩余端点以将多部分数据上传到Google云存储 - How to create a rest endpoint using Google App Engine (Java) to upload multi part data to google cloud storage 如何从独立的Java应用程序(而不是从GAE网络应用程序)连接到本地Google Cloud Storage? - How to connect to the local google cloud Storage from standalone java application (not from a GAE web-app)? Google App Engine:部署后的ClassNotFoundException,但在本地服务器上运行正常 - Google App Engine: ClassNotFoundException after deploy but runs fine on local server Google Cloud Storage通过App Engine定价 - Google Cloud Storage thru App Engine pricing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM