Closed imagelesskink closed 8 months ago
Hmm.
Hmm. I seem to have narrowed it down to some vanilla behaviour :
Run a server, do some things on it.
Run /save-all
and notice that despite it saying things were saved, the files on disk have not changed.
Let an autosave happen and notice that the same thing happens.
Run /save-all flush
and observe a lag spike. The files on disk do change here.
I was consistently able to reproduce this across forge, fabric and pure-vanilla, similar behaviour on client, and across multiple minecraft versions.
save-all
, myself and other backup mods all make the same calls to vanilla methods.
Advanced Backups used to force a flush, but due to complaints of sometimes server-crashing lag spikes this was removed.
I have checked some other backup mods and those I checked also don't force a flush...
As such, this leaves me a bit uncertain as to how to proceed...
I think a config option for flush
is the best idea - but I'm still concerned by your report of server sometimes botches up the save when restarting...
Okay, after some further investigation - I've noticed that the attribute showing when the file was last updated doesn't change, but the hash does change every single tick where the respective file would be open.
This explains why zip and other mods seem unaffected - as those do not check file dates, they just copy the entire world state.
I'll fix this by using hashes to check which files backup - it can result in some extra bulk, but imo this is a perfectly good tradeoff.
Thanks for the report!
Closing this issue as a result - feel free to re-open if you have any further issues.
Figured I'd alert you that this is now out on Modrinth @imagelesskink
It's pending approval on curseforge.
Describe the bug No matter which version of the differential backups I restore, it always go back to the full backup.
To Reproduce Steps to reproduce the behavior:
Expected behavior Turn back time for just an hour or so
Versioning (please complete the following information):