How do DS2 backups save? (For upcoming module)

So I know kind of how DS2 backups save, you know, using like the datastore as

DataStoreName.."/"..key

and then having like the keys as “1” and “2” for the backups;

This is atleast what I’m doing with my module which I’m buiding, I’m probably gonna launch it for the public;

But anyways, I noticed that compared to DS2 exiting the game takes a significant longer amount of time;

So I’m wondering what I’m going wrong, if I’m doing something wrong. I have some suspisions, like
I have a Update Function, and using UpdateAsync both on the backup and “1”, I think I’m supposed to ignore the UpdateAsync call on the backup, and instead using SetAsync? And only doing so if the UpdateAsync call is actually saving something and not returning nil, currently I’m doing this:

Also, do you have any details on how I could improve this? Like, how should I save backups, and how often and when and stuff;

Btw I changed the UpdateAsync to only on the “1” version, and it still is KIND of slow, definelity less but I think backups are just supposed to take a bit to save? But still, now my main question is “Am I doing this right?”

I wanna make this use the best method before EVER releasing it. I don’t wanna have to mess with back-wards compability later on.

Guys, I need some feedback. If you know a way that is good to keep backups, TELL me. Or if you know DS2 backups and how they work in Standard Method.

Sorry for the bump, found this old topic so um…

Oh wow this thing changed. Um…

Anyways, just to have an answer, datastore2 will handle data like this:

Standard: literally nothing special. Normal Datastores, normal saving.

OrderedBackups saves a pointer in OrderedDataStores, and then the actual data into another Datastore with the key being that pointer. This pointer increases every time you save.