question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Automated player and world backups

See original GitHub issue

Intro

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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Chicken-Bonescommented, Jan 21, 2019

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

foreach backup for this world from oldest to newest:
  freshness = days_old > 30 ? 30 : days_old > 7 ? 7 : 1
  if (current_backup.time - previous_backup.time).days < freshness
    delete previous_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.

1reaction
Jofairdencommented, Jan 21, 2019

That sounds pretty solid, I’m up for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automated player and world backups · Issue #306
Intro A modder or user might want automatic backups by tModLoader of player and world files. Not out of necessity, but usefulness.
Read more >
Automate Backups for a single player world?
You just need to keep multiple backups, so in the rare case it backs up the same time the world is saving, the...
Read more >
[AoE] Automated backups on Single Player? : r/feedthebeast
Just go to world selection from the main menu, and on the bottom you should see a "Backups" button. Click it, select one...
Read more >
How To Backup Minecraft Automatically to Never ... - YouTube
On top of that Backblaze can run an automatic backup of your Minecraft files every 24 hours. We recommend using Backblaze and offsite...
Read more >
Shared World Automated Standard Backups - Grounded
If the players want more granular backups they'd still have to create manual standard copies, but if there was an automated copy of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found