Precaution restart
Follow these steps if:
- snapshots are failing for an extended period
- an alert is fired based on deployment metrics
Around 20 minutes before you remove players from the game, stop players from joining the game.
If you’re using your own authentication server, you’ll need to set up your own way of stopping players from joining the game.
Create a worker flag to let players know that you’re going to stop the game:
- In the Console, open the deployment and go to the Worker flags tab.
- From the drop-down list, select the worker type that you registered the callback for, and add a worker flag with the same name as you used when setting up the callback.
- Set the flag’s value. This is handled by the callback you set up above. For example, you could set the value to be a message to display to players.
- Click Submit. This sends the flag update to the worker.
Five minutes before you remove the players from the game, let them know by updating the worker flag.
Remove all the players from the game.
Take a snapshot of the deployment without players in it:
spatial cloud history snapshot create <deployment_name>
- Download this snapshot:
powershell spatial project history snapshot download <deployment_name> latest <snapshot_file>
wheresnapshot_file
is the file name you want to give the snapshot.
- Download this snapshot:
There may be elements of the game world that you want to edit or remove before restarting, such as battle debris or timestamps. To do this, you’ll probably need to convert the snapshot into a text file:
spatial project history snapshot convert --input=<snapshot_file> --output=<text_file> --input-format=binary --output-format=text
When you’ve finished editing the file, convert it back:
spatial project history snapshot convert --input=<text_file> --output=<snapshot_file> --input-format=text --output-format=binary
From your project folder, run a cloud deployment using the snapshot:
spatial cloud launch <assembly_name> <launch_config> <deployment_name> --tags=<comma-separated list of tags> --snapshot=<snapshot_file>
Validate the deployment from the Console.
On the Advanced tab, confirm that all nodes are healthy:
In the World view, check you have the right number of different types of worker:
- Let your community know they can join the game again.