恢复appengine数据存储数据的选项? [英] options for restoring appengine datastore data?

查看:166
本文介绍了恢复appengine数据存储数据的选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们应用程序的用户意外删除了数据。他们希望这个恢复。我们没有专门的逻辑或数据存储实体可以做到这一点。



但是,我们使用数据存储管理员将整个数据存储每日备份到blobstore。



我们有选择性地将部分备份恢复到数据存储中?



就像没有其他用户的服务中断一样。最后一个限制是我们无法更改我们的产品应用程序ID(即将数据复制到新应用程序,然后将备份恢复到我们的旧应用程序 - 这是因为我们的客户直接引用了我们的appid)。



想法?



UPDATE



考虑在我们的应用程序中的所有blob上运行mapreduce,并找出与我们的备份有关的那些。解析这些备份并根据需要恢复实体。唯一的问题是,blob存储的格式是什么?如何解析它们?

解决方案

自1.6.5版本以来,Datastore Admin允许您从现有备份中恢复个别种类。

关于备份格式:根据数据存储管理员源代码您可以使用 RecordsReader 在MapperPipeline中读取存储在中的备份文件

A user of our application has accidently deleted data. They'd like this to be restored. We have no special logic or datastore entities that can do this.

However, we do daily backups of our entire datastore to blobstore using the datastore admin.

What are our options for selectively restoring part of this backup back into the datastore?

We'd preferably like to not have a service interruption for other users. One final restriction is that we can not change our production app id (i.e. copy data over to a new app and then restore the backup to our old app - this is because our clients reference our appid directly).

Thoughts?

UPDATE

I was thinking of running a mapreduce over all the blobs in our app and finding the ones that are to do with our backup. Parsing these backups and restoring the entities as needed. The only issue is, what format are the blobs stored in? How can I parse them?

解决方案

Since 1.6.5 the Datastore Admin now allows you to restore individual Kinds from an existing backup.

About the backup format: according to the datastore admin source code you can use RecordsReader to read backup file stored in leveldb log format in a MapperPipeline

这篇关于恢复appengine数据存储数据的选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆