Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion : Implement Selective Backup for Claimed Chunks and Active Areas #93

Open
superhealing opened this issue Aug 16, 2024 · 2 comments
Assignees
Labels

Comments

@superhealing
Copy link

To optimize storage usage and focus on backing up only the most critical parts of a world, I propose adding an option to back up only claimed chunks and the surrounding area (e.g., a radius of 5+ chunks around each claimed area). This approach would significantly reduce the storage footprint by excluding unimportant or easily regenerable parts of the world. (Chunks not region)

Proposed Features

  1. Claimed Chunk Backup:

    • Backup only chunks that have been claimed by players(FTB Chunks).
    • Include an option to extend the backup area by a configurable number of chunks around claimed areas (e.g., 5+ chunks).
  2. Active Area Detection:

    • Utilize Minecraft's InhabitedTime NBT tag to identify frequently visited or inhabited chunks.
    • Set a threshold for InhabitedTime to determine which chunks should be included in the backup.
  3. Configurable Options:

    • Make this feature optional and disabled by default in the mod's configuration.
    • Allow users to set the extension range for claimed chunks.
    • Provide an option to set the InhabitedTime threshold for active area detection.
  4. Exclusion List:

    • Implement an exclusion list for specific structures or areas that should always be backed up, regardless of claim status or activity (e.g., spawn chunks, important mod-generated structures). (server-side claim?)
  5. Incremental Backups:

    • Consider implementing incremental backups to further reduce storage usage and backup time.
  6. Scheduled Full World Claim Backup:

    • Introduce a command or setting that allows server admins to schedule automatic full world backups at regular intervals (e.g., weekly). This command should ensure that all claimed chunks and their surrounding areas are included.
    • Provide configurable settings in the mod's options to specify the frequency and timing of these scheduled backups.
    • This feature aims to balance regular comprehensive backups with the need to minimize storage usage, ensuring that recent changes to critical areas are preserved without overwhelming the server's storage capacity.

Benefits

  • Reduced storage requirements for backups.
  • Faster backup and restore processes.
  • Preservation of important player-built areas and actively used regions.
  • Minimal impact on world regeneration, assuming the seed and world generation mods remain unchanged.
@ThePaul-T
Copy link
Contributor

ThePaul-T commented Aug 16, 2024

Some of this is a pretty good idea honestly, will add to our list.

We will probably not implement exactly as you've envisioned, as a lot of the suggestions as-is would cause it to be slower.

However, integrating with chunks, and calculating which whole regions would have claimed chunks in them (use the maths to calculate chunk co-ords to region file, rather than access the world) and then backup regions (and level.dat) selectively is something I plan for us to look into now.

@StoneLegion
Copy link

I just came to ask this as well haha, Server Utilities did this a backport for 1.7.10. Might have some idea's you can check here:
GTNewHorizons/ServerUtilities#101

Thanks for your consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants