0

I have some data stored in the Google Datastore. I have two entities in the Google Datastore for this purpose. I was wondering if there is a way to backup these Datastore entries periodically to my local machines ? I searched the internet and could some answers related to using task queues, cron jobs, etc but none of them offered a complete, working solution to this problem. It would be great if someone could share their ideas about how to periodically backup the datastore to local machines.

Thanks and Regards, Rohith

4

2 回答 2

0

有一种方法可以从管理控制台备份数据存储,但它是手动备份。

正如您所提到的,使用 cron 作业或任务队列肯定可以让代码进行备份(您有一个读取整个数据存储的 cron 作业,然后将其本地复制到 csv 或其他东西)。我对此的担忧是成本,因为读取/复制整个数据存储肯定不会扩展,而且实际上最终会非常昂贵。

如果您每月需要一次或每隔一个月需要一次,我会手动进行备份。我不知道是否有办法以编程方式调用该备份功能

于 2014-08-22T14:13:11.683 回答
0

您可以使用托管导出和导入功能,该功能可通过 gcloud 或 Datastore Admin API 访问。您可以手动导出数据或使用 App Engine 按计划导出:

导出和导入实体

安排导出

于 2018-03-12T16:14:24.037 回答