Do you have any suggestions for backing up a parse.com database regularly?
Information about this are quite scarse, and I'd like to perform something similar to the manual export data function in the dashboard, but daily.
Does anyone have a script or something like this that they would like to share?
Parse said they were going to think about this feature but a year has passed.
The principal goal of backup scheduling is to establish time frames to back up an entire system, multiple systems, data and databases, network files, and other critical systems and data.
Important data should be backed up at least once a week, but preferably once every twenty-four hours. These backups can be performed manually or automatically. A lot of automatic software options are available that you can set to make a backup of your data at a set time of the day or week.
To backup your Parse data, you simply would need to get all the records for every Parse Class that you have. For this example, I'll borrow from the Parse REST API documentation. Parse has SDK's for JavaScript, .NET, and iOS/OS X, all of which provide a similar functionality to what is described here.
To get records from a Parse Class called 'GameScore', you could do something like:
curl -X GET \
-H "X-Parse-Application-Id: <YOUR APPLICATION ID>" \
-H "X-Parse-REST-API-Key: <YOUR PARSE REST API KEY>" \
-G \
--data-urlencode 'limit=1000' \
--data-urlencode 'skip=4000' \
https://api.parse.com/1/classes/GameScore
Here limit=1000
means you are going to get 1000 records at a time (the biggest amount possible), and skip=4000
means we want to skip the first 4000 records. Basically you would just repeat this command, starting with skip=0
and incrementing skip
by 1000 every time until the number of records that comes back is less than 1000 (no more records left). Rinse and repeat for all of your Parse Classes and your data will be backed up.
I had the same issue of backing up parse server data. As parse server is using mongodb that is why backing up data is not an issue I have just done a simple thing. downloaded the mongodb backup from the server. And then restored it using
mongorestore /path-to-mongodump
(extracted files)
As parse has been turned to open source.Therefore we can adopt this technique.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With