Backups

Sometimes it’s useful to create backups of your save files, for example if you want a way of recovering it in the rare case that data becomes corrupted due to a hardware fault, or if the file has been tampered with.

You can do this using the ES3.CreateBackup, and ES3.RestoreBackup to restore a backup. A backup is created by copying the file and giving it a .bak extension.

If a backup already exists it will be overwritten, so you will need to ensure that the old backup will not be required before creating a new backup.

Also note that restoring a backup will overwrite the file it’s a backup of.

Examples

C#

Creating a backup of a file.

JS

Creating a backup of a file.

C#

Restoring a backup if an exception occurs during loading.

JS

Restoring a backup if an exception occurs during loading.