Automated player and world backups
See original GitHub issueIntro
A modder or user might want automatic backups by tModLoader of player and world files. Not out of necessity, but usefulness. A corrupt mod maker could easily perm. erase a user’s files, possibly deleting their life work. Suggestion opened for debate with this issue thread.
Suggested
By default, feature is toggled off, as it sort of spams personal storage. Feature is toggable through settings, and has a few modes:
- On launch backup
- Creates a backup only everytime the exe is started
- On exit backup
- Creates a backup only on exit of exe (harder! how to detect forced termination?)
- On interval backup
- Creates a backup every set interval, timed between minutes, hours, days or weeks.
Or, instead of modes, any or more toggable (multiple modes at the same time)
Suggested method of storage is folders by epoch time and/or just date (at the time of performing the backup), which contains the backups, along with a file that has information about installed and enables mods during the backup. Location: ModLoader/Backups/Players
/ ModLoader/Backups/Worlds
Other suggested feature is automated deletion of backups older than # time.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
I’m going to vote for this issue, I implemented something similar with the logging system, and it would be very good for recovering worlds/players.
The average world size is 11-12MB, zipped to around 4.5MB I suggest the following: New folders Players/Backups, Worlds/Backups Track down anything that’s killing .bak files Each time a world is successfully loaded, make a backup
This will keep one backup per day for the last week, one per week for the last month, and one per month for all time
Add a backup size limit (say 200MB by default) after which backups are always deleted, oldest first.
That sounds pretty solid, I’m up for this.