How to "DataStore Backups & Rollbacks"?

My question is… How do you guys make datastore backups?

Essentially just a second datastore that saves at the same time as an ‘extra security step’?

Or rather do you guys use third party softwares such as this one:

Let me know what is the most efficient and secure way of backing up data.

If you don’t want to save your own backups, which I would be careful with due to the eventual 2026 changes to datastorage caps (under the Future Storage Limits tab), Roblox also has their own versioning system (though it also has its own limitations):

I see the mention of snapshots inside one of these documentions, however I didn’t find anywhere a way to make them.

Or rather I did, but it sounds confusing to me.
‘POST /cloud/v2/universes/{universe_id}/data-stores:snapshot’
This apparently creates a new snapshot, but where am I supposed to excute this line of code?

Any help with that?

That’s done through cloud stuff. Unfortunately, I have no experience in that regard. I believe this is something that’s meant to be done externally, but it might be possible to do in-game too. I talked to Roblox about this before, about how the Cloud API is a bit excessive and over-complicated, limiting its use to developers who tend to work with external stuff anyway, such as Rojo. They’ve said that there may be plans to create more user-friendly modules to interact with these things. I wish they’d just create native services like they do for most things. But they gave me some reasons why the Cloud option makes more sense, which I’d be fine with if they were simpler to utilize within Studio.

Maybe somebody with more knowledge on this can step in.

That said, the versioning automatically occurs when a new save is created. Also, if you don’t want to bother with this Cloud stuff or your own versioning system, you could just move to a new DataStore if you’re revamping the framework. But then you’d have to convert old DataStores to the new framework, which is going to be 2 Get requests per user, even if they don’t have old data, unless you do the Get for the new data first and then check the old data, then it’s only 2 Get requests for new or returning players from before the update.

You can read on it here: https://create.roblox.com/docs/en-us/cloud-services/data-stores/versioning-listing-and-caching#versioning

That is an OpenCloud url, it’s used by external programs to access Roblox datastores. It is harder to use, as you have to write the program yourself or get a program written by someone else. There doesn’t seem to be an alternative (unless maybe it is in the developer hub as a button?)

In luau, it looks something like this. This is using the lune luau runtime

local net = require("@lune/net")

local Key = "DO_NOT_SHARE"

local Result, Error = net.request({
   url = "https://apis.roblox.com/cloud/v2/...",
   method = "GET",
   headers = { 
      ["x-api-key"] = Key
   },
})

if not Result then error(Error) end
if not Result.ok then error(Result.statusCode .. " " .. Result.statusMessage) end

local Body = net.jsonDecode(Result.body)

Information about the snapshot OpenCloud endpoint is here

This tells you how to format the request, and what it returns. It uses curl syntax for the request (which I am not familiar with), but you can still infer the information about it fairly easy. Dunno what -L and -X is, but don’t care


This is a post request, (as marked by POST), so in my code snippet, you’d replace method = "GET" with method = "POST" (this describes what the request is), -H means header, so you’d add ["Content-Type"] = "application/json" (this describes what is the format of the data you are sending), --data is the body of the request I think, so in lune it would be a new field alongside url, method, …, body = {}. Here it is an empty table, because you aren’t sending anything, but maybe they are future proofing the method or something?

Yep! This was announced here. Note that only some OpenCloud endpoints can be used from within roblox, and it doesn’t seem like the snapshot endpoint is whitelisted?

Using OpenCloud endpoint often requires learning a new programming language, such as python or javascript (because lua doesn’t really have good networking libraries on the internet, and I HAD SO MANY ISSUES WITH LUAROCKS AND LUASOCKET AAAAAAAAAAAA), but with lune, it’s not too hard to get things up and running. Once you have lune running, it’s luau, so that doesn’t change, the api is a bit different (net library instead of HttpService), and you have to learn a bit the http protocol (which is on the simpler side when it comes to the world of overcomplicated software lol).
A recommendation, and something that has helped me learn this kind of stuff, is using Ai to ask questions. I ask it questions that help me understand the logic behind things, and it is quite useful at that. But avoid using Ai to write you everything, unless you don’t want to learn… (but good luck debugging afterwards

2 Likes

Yeah, that seems to wrap it up.

I guess it’s time for me to learn something new.
Thank you!

1 Like

I would use In-game HTTP requests | Documentation - Roblox Creator Hub to keep track of the whitelisted endpoints instead of the announcement post (which does not get updated for new endpoints).

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.