简体   繁体   English

iOS-Parse.com导出数据自动化

[英]iOS - Parse.com Export Data automation

I am using Parse.com as the backend for my iOS app. 我正在使用Parse.com作为iOS应用程序的后端。 Parse has a big Export Data button for backing up your database that will send an email with a zip containing each table and its data in JSON format. Parse有一个很大的Export Data按钮,用于备份数据库,该按钮将发送一封包含zip的电子邮件,其中包含每个表及其JSON格式的数据。 That's great, but is there any way to automate this task? 很好,但是有什么方法可以自动执行此任务? I want to be able to do this every night, and I know you can use Background Jobs for automated tasks, but is it possible to hook into this particular feature? 我希望每天晚上都能做到这一点,而且我知道您可以将Background Jobs用于自动化任务,但是可以使用此特定功能吗? I couldn't find an answer on Parse's forums and it didn't turn up anything except old threads talking about how this feature was on the horizon. 我在Parse的论坛上找不到答案,除了讨论该功能即将到来的老话题之外,它什么也没出现。

The best I can work out, without Parse providing a true way of achieving this, is to have a job creating File objects in a "backup" table. 在没有Parse提供实现这一目标的真正方法的情况下,我能解决的最好的事情是让工作在“备份”表中创建File对象。 And then use an external service (with the REST API) to pull this out into S3 or similar. 然后使用外部服务(带有REST API)将其拉入S3或类似版本。

It's not ideal, but it would work. 这不是理想的方法,但是会起作用。 Also, it will count against your API requests so you may want to optimise with the updated flag. 另外,它将计入您的API请求,因此您可能要使用update标志进行优化。

What I do for this issue is I am running a simple Windows Server in the AWS EC2 to run a scheduled task. 对于此问题,我要做的是在AWS EC2中运行一个简单的Windows Server以运行计划的任务。

  • Create simple bat file to run a command node parse-backup.js 创建简单的bat文件以运行命令节点parse-backup.js
  • Create basic scheduled task using windows provided scheduler and run bat file 使用Windows提供的调度程序创建基本的计划任务并运行bat文件

You can use this node code. 您可以使用此节点代码。 https://github.com/mkim871/parse-node-backup https://github.com/mkim871/parse-node-backup

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM