Bugs During Save

I’ve seen a few reports where people get a bug during the save process and then repeat the save to see if it happens again.

I wanted to highlight this situation specifically, so that people don’t lose their games.

All the data for the game is stored in a database, in the AuroraDB file. When a save takes place, the code deletes the information in AuroraDB and replaces it with new information held in the program memory. This is done once for each type of information, such as Ship, Fleet, Commander, Population, etc., which each have their own table in the database.

If there is an error during that process for a given type, the deletion process will have been completed, but not the save. So if you have an error when saving fleets, all the fleets in the database have now been deleted - they only exist now in the program memory.

However, before Aurora saves, it creates a copy of the entire database called AuroraDBSaveBackup, which has all the information from the previous save. The previous AuroraDBSaveBackup file is also copied into AuroraDBPreviousSaveBackup, so you have copies of the previous two saves.

IMPORTANT: When you get an error during saving, don’t try saving again until you make your own copy of AuroraDBSaveBackup and call it something else. Then if all else fails, you can delete your AuroraDB and rename your copy of AuroraDBSaveBackup to AuroraDB. This will restore your game to the last save before the error.

If you repeatedly save and get the error, the empty table will be propagated into the save back up files and the data will be lost forever.

Instead, follow the above process and then try to figure out the problem (by asking on here or Discord) before you save again. If you can’t fix it, then the worst case scenario is returning to your previous save.

10 Likes

How much effort would it be to wrap the entire save process in a SQL TRANSACT ROLLBACK clause?

It would effectively mean that any error in the save process would cancel the save process. Which I suppose is exchanging one problem for another without breaking it down and doing it for individual sub-processes like saving ships etc.

AuroraDBSaveBackup is effectively the rollback.

If I abandon the save process, then AuroraDB would still have the old save, which is the same as the AuroraDBSaveBackup will have post-save.

1 Like

Have you considered to allow a set number of extra backup decided by the player? You could have AuroraBackup01, 02, etc.

I am asking because I somehow always hit save twice as I want to ensure I have the backup of the backup, however, that doesnt allow for previous saves.

I already sorted by manually copying the backups on a separate folder, so just a thought.

Thanks Steve, also I suggest as good pratice to have a sub-folder when you backup your main save files, and rename them. So you have also an history of your Empire and you can take a look back if you wish :saluting_face: You can also check the growing of your file size :slight_smile:

1 Like