Ok, so sadly. I didn’t use Combined DataStore2 from beginning, and after 5k visits, I need to migrate data from 7 separate DataStores to one Combined.
I don’t know how to migrate data, and I need to be 100% sure, that all players will have their data.
KampfKarren, told me to use this method:
This is what I tried;
local DataStore2 = require(1936396537)
DataStore2.Combine("MasterKey, key1, key2, key3")
game.Players.PlayerAdded:Connect(function(player)
local oldStore = DataStore2("Key1", player)
local newStore = DataStore2("key1", player)
if oldStore:Get() ~= nil and newStore:Get() == nil then
newStore:Set(oldStore:Get())
end
end)
So my question is, would this be secure way to migrate data?
If she told its a secure method then it most likely is. Also, what you can do in studio is test it yourself. First ensure that you enable studio’s access to api services, and then just test it yourself.
Cases like this are why it’s always better to read documentation, understand the limitations and know what you’re working with first before you get into the grit. You could very possibly need to take a risk and wipe data for existing users.
DataStore2 is still bound to regular DataStore limitations (call request limits specifically), so merging 7 DataStores to 1 (around 8-9 calls) is already eating up your budget per minute, with your only rebound case being increase of budget per player.