简体   繁体   English

在Google App Engine上备份数据的最佳方法是什么?

[英]What's the best way to back up data on Google App Engine?

Google itself provides two solutions. Google本身提供两种解决方案。

http://code.google.com/appengine/docs/python/tools/uploadingdata.html http://code.google.com/appengine/docs/python/tools/uploadingdata.html

One of these is new and experimental and requires you to run a separate command (and separately enter your username and password) for each kind of data you want to back up. 其中一个是新的和实验性的,需要您为要备份的每种数据运行单独的命令(并单独输入您的用户名和密码)。

The other requires you to twice write out information on the structure of all the kinds of your data, information that is already implicit in your models file. 另一个要求您两次写出有关所有类型数据结构的信息,这些信息已经隐含在模型文件中。 (We've got 25 different kinds of data so I'm sensitive to this kind of stuff. Plus it will mean future changes will have to be made in 3 places.) (我们有25种不同的数据,所以我对这种东西很敏感。另外,这意味着未来的变化必须在3个地方进行。)

Then there's Aral Balkan's solution (google for "gaebar"), but his code on Github hasn't been updated in about a year, and he's additionally telling people to do some modification to App Engine internals (which seems risky, since they change in every version). 然后是Aral Balkan的解决方案(google用于“gaebar”),但他在Github上的代码在大约一年内没有更新,他还告诉人们对App Engine内部进行一些修改(这似乎有风险,因为他们改变了每个版本)。

I think I'm leaning towards Google's non-experimental solution, but they all seem pretty bad. 我认为我倾向于谷歌的非实验性解决方案,但它们看起来都很糟糕。

Here is a more explicit description of bulkloader.py no-config backup and restore solution. 以下是bulkloader.py no-config备份和还原解决方案的更明确说明。 I do not know when this issue ( stack overflow ) arises. 我不知道什么时候出现这个问题堆栈溢出 )。

Dumping data from fooapp into a file called dump1.bin: 将数据从fooapp转储到名为dump1.bin的文件中:

python2.5 /usr/local/google_appengine/bulkloader.py  \
  --dump --url http://fooapp.appspot.com/remote-api-url \
  --filename dump1.bin

You must have the remote API enabled . 您必须启用远程API The remote-api-url might be _ah/remote_api depending on your configuration. remote-api-url可能是_ah/remote_api具体取决于您的配置。

Loading up data from dump1.bin to a local dev instance: 将数据从dump1.bin加载到本地开发实例:

python2.5 /usr/local/google_appengine/bulkloader.py \
  --restore --url http://localhost:8080/remote-api-url \
  --filename dump1.bin --application fooapp

This assumes a UNIX-like system and that appengine is installed in /usr/local/google_appengine. 这假定类似UNIX的系统,并且appengine安装在/ usr / local / google_appengine中。

I don't know if it works with Java, but it might. 我不知道它是否适用于Java,但它可能。

看看AppRocket (一个同步Google App Engine数据存储区和MySQL数据库的开源复制引擎。)该项目似乎很活跃。

What's wrong with the --dump functionality? --dump功能有什么问题? Yes, you have to download each kind separately, but that's going to be the case with any solution. 是的,您必须单独下载每种类型,但任何解决方案都是如此。 If you just want backups, it fits your requirements exactly. 如果您只是想要备份,它完全符合您的要求。

暂无
暂无

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

相关问题 在Google App Engine中使用Java,什么是存储和访问大型静态数据的最佳方法? - Using Java in Google App Engine, what's the best way to store and access large, static data? 通过AJAX将用户输入的文本发送到Google App Engine的最佳方法是什么? - What's the best way to send user-inputted text via AJAX to Google App Engine? 安排在Google App Engine中运行超过十分钟的任务的最佳方法是什么? - What's the best way of scheduling a task that runs over ten minutes in Google App Engine? 在Google App Engine上存储数据或查询数据的最佳方法 - The best way to store data or query data on google app engine 分析/优化Google应用引擎应用的最佳方式是什么? - What is the best way to profile/optimize google app engine application? 实施Google App Engine Java全文搜索的最佳方法是什么? - What is the best way to implement fulltext search for Google App Engine Java 在App Engine实例之间共享资源的最佳方法是什么 - What's the best way to share resources between App engine instances 在Google App Engine上存储常量数据的最佳方法 - Best way to store constant data on Google App Engine app-engine-patch已经死了。 现在,在Google App Engine上使用Django的最佳方式是什么? - app-engine-patch is dead. Now what is the best way to use Django on Google App Engine? 在 Google App Engine 中查找相对路径的好方法是什么? - What's a good way to find relative paths in Google App Engine?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM