has anyone thought about backup of the player data? I don’t see any build-in function that can backup the whole player database.
I’m worried if a player data is broken somehow and that I need to restore to the previous day.
one method I could think of is that. when a player logs in. I will take a snapshot of all the keys/values and save as key1_bak/value key2_bak/value…
then next day when the player logs in again. I refresh the key1_bak/value key2_bak/value…
but what if I accidentally deleted this player and all it’s keys?
How do you think about the necessity of backing up?
Hi wuzytech,
We continuously back up the data in Cloud Save and we have redundancies in place. We are able to recover in the case of catastrophic failure of the database (a highly unlikely scenario).
If you are concerned about corrupting your data from your game clients in Cloud Save, and the volume of data is relatively low, then your idea of a backup in a secondary location is a good one. You could either store the data in a another key in the player data Cloud Save item, or you could use the Custom data APIs via Cloud Code to store these backups. See this page for the javascript sdk or you could use Cloud Code C# modules and use the nuget package.
You could also consider packaging all the player data into a single json string and store that under a single key in Cloud Save. Remember that there is a 5MB limit for Cloud Save item across all keys within that item.
Hope that helps.
Francois
1 Like