-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add option to only backup claimed chunks #101
Conversation
Just tested this on my old UMV world where it brought the backup size down from 3.2GB to just 34MB whilst keeping my entire base & all my many random claims intact and working. It was small enough that it only took a staggering 5 seconds to upload it as proof if anyone wants to check it out |
This should require a Void Miner controller to enable, otherwise it provides infinite resources 👏 |
@S4mpsa if people are purposely restoring backups, they might as well give themself creative mode |
It was more of a joke, I don't think we can enforce config options with in-game progression 😅 |
@jusvit you need to update gtnhlib |
Fixes look good, chunks are as-expected. |
Is this going to be default on? |
Nah it will be disabled by default |
27480ba
to
971d7e1
Compare
…up-improvement # Conflicts: # src/main/java/serverutils/ServerUtilitiesConfig.java
…up-only-claimed-chunks # Conflicts: # src/main/java/serverutils/ServerUtilitiesConfig.java
…-chunks # Conflicts: # src/main/java/serverutils/ServerUtilitiesConfig.java # src/main/java/serverutils/task/backup/BackupTask.java
…s somehow missing
…to backup-only-claimed-chunks
…ed-chunks # Conflicts: # src/main/java/serverutils/ServerUtilitiesConfig.java # src/main/java/serverutils/task/backup/BackupTask.java # src/main/java/serverutils/task/backup/ThreadBackup.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I didn't feel like dealing with the merge conflicts so it's currently based on #100 and will be drafted for now,
This extracts only the chunks that are claimed and saves them to a temporary region file which then gets zipped up, the final result is much much smaller than your usual backup and created in a fraction of the time.
Here is two chunks about to be mercilessly blown up, the one on the left is claimed and the one on the right is not. Above them is a chest full of delicious melon.
This is after several OSHA violations occured and is also when the backup was taken.
And finally we have the chunks after the backup was restored. This shows that only the claimed chunk remained in it's previous state while the unclaimed one was regenerated from new. (two of the obisidian lines were outside the chunk border)
The melons survived too
Old test which showed a mysterious patch of mossy cobble regenerating in the claimed chunk
This line of tnt is directly on a chunk border between a claimed (on the left side of the tnt) and an unclaimed chunk
This is the result of the explosion
And this is after restoring from a backup, showing that only the claimed chunk on the left remained the same while the unclaimed regenerated from new. For unknown reasons Minecraft generated a patch of mossy cobble in the claimed chunk after restoring from backup, which will need to be investigated.
Closes #75