I am using Parse.com as the backend for my iOS app. 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. 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? 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.
4
-
So you want to use your user's phone to email you data?trusk– trusk2015-09-07 19:49:22 +00:00Commented Sep 7, 2015 at 19:49
-
Excuse me? I want to backup my database automatically at certain intervals. Not sure where I mentioned anything about a user's phone.Ryan Bobrowski– Ryan Bobrowski2015-09-07 19:50:06 +00:00Commented Sep 7, 2015 at 19:50
-
Then how is this related to swift? or iOS for that mattertrusk– trusk2015-09-07 19:52:25 +00:00Commented Sep 7, 2015 at 19:52
-
Because I'm using Parse for my iOS app. For all I know there's also a way to hook into the Export Data feature from my app. Giving as much context as possible. I still don't understand where you got "user's phone" from. Either way, not really helping - but thanks for your input.Ryan Bobrowski– Ryan Bobrowski2015-09-07 19:56:34 +00:00Commented Sep 7, 2015 at 19:56
Add a comment
|
2 Answers
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. And then use an external service (with the REST API) to pull this out into S3 or similar.
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.
Comments
What I do for this issue is I am running a simple Windows Server in the AWS EC2 to run a scheduled task.
- Create simple bat file to run a command node parse-backup.js
- Create basic scheduled task using windows provided scheduler and run bat file
You can use this node code. https://github.com/mkim871/parse-node-backup