MommyHeather / AdvancedBackups

BSD 3-Clause "New" or "Revised" License
21 stars 5 forks source link

Feature request : Update Messages for bigger backups #71

Closed Kerrghan closed 3 weeks ago

Kerrghan commented 2 months ago

I have a larger world so the backup took 8 minutes and I had no idea if the backup was still running or if it somehow bugged out.

A solution for this could be some sort of progress messages that we could enable in the configs, to show that the backup isn't stuck. That message would be send every 30 seconds or every minute so that we would know that it's working as intended

A progress bar (as bossbar in game) for admins to see that the backup is running could be a nice alternative.

I know this would only really be required for big worlds, since a newly created world instantly backups, but I have just preloaded the world with chunky on a 10000 blocks radius circle to not experience lag while players travel and the world files are rather big so it takes a lot of time to backup.

MommyHeather commented 1 month ago

I'll have console progress updates, I'll likely aim for that at the same time as a 1.21 release (will of course be backported to all versions the mod supports)

Admins should already get a toast to show backup progress, provided they a) have the mod and b) are opped. (on 1.7.10 this toast is replaced with some text in the top left corner, with the same prerequesites)

MommyHeather commented 1 month ago

In 1.21:

Chat / bossbar logging likely won't happen however. Spigot/paper support is planned, and they should be able to network with Neoforge and Fabric clients. Not sure about Forge right now, as it doesn't wrap the vanilla networking system in a nice manner.

MommyHeather commented 1 month ago

Version 3.6 adds four new config options:

Config Description Default Value
config.advancedbackups.logging.clients Which clients to send backup progress info to. ops
config.advancedbackups.logging.clientfrequency How often to send backup progress info to clients, in milliseconds. 500
config.advancedbackups.logging.console Whether to log backup progress info to console. Start and end are always logged. true
config.advancedbackups.logging.consolefrequency How often to log backup progress info to console, in milliseconds. 5000

These can be achieve all of what you've asked for.

MommyHeather commented 4 weeks ago

image And just for completeness, I've attached a screenshot of my (client) log with the console frequency set to 750ms. Note that this is a relatively small backup, but will work as expected for all backups.

Kerrghan commented 4 weeks ago

This is perfect, couldn't ask for anything better, thank you so much

MommyHeather commented 3 weeks ago

https://github.com/MommyHeather/AdvancedBackups/actions/runs/9570305561

A release candidate build of 3.6 is available here, and will be on curseforge/modrinth once I've got 1.21 and a plugin build working. Feel free to let me know if you have any issues!

Kerrghan commented 3 weeks ago

I'm testing it right now, I'll send screenshots once it's done. It works well for now on 1.20.4. Oh and thanks for pointing out that we have a toast if the mod is installed on the client, that's gonna be useful as well. But I saw that the toast only checks if I am op, I'm using luckperms on fabric and there doesn't seem to be a permission for that. Is that by design or just something you didn't think of?

MommyHeather commented 3 weeks ago

It's too difficult to integrate with, at least on the modded front, but the upcoming plugin may see some releases. Most modded servers have no concept of a proper permissions system, and those that do are inconsistent and unstable - so there's no reliable api for me to interact with.

There is of course now the all mode for client toasts, but I do understand why that often just isn't what a user wants.

Kerrghan commented 3 weeks ago

Luckperms is active on all modloaders and as a plugin, so might want to look into that, I'm pretty sure it uses the same api on all loaders, but don't quote me on that Also: Capture d'écran 2024-06-19 105718 Capture d'écran 2024-06-19 105737

Kerrghan commented 3 weeks ago

I didn't change the settings after updating from the old version, I'll just tweak it so that it doesn't flood my console but it works great, thank you!

MommyHeather commented 3 weeks ago

Excellent to hear!

As for Luckperms, I am aware that it is supported on most modloaders, but that doesn't really affect most of what I say ultimately - it's far from the only modded option, and it looks like it'll be too much work to fully support sadly. It's always been something sat at the back of my mind, just low priority.

Kerrghan commented 3 weeks ago

Alright, no problem, thx a lot for this feature, with it being logged in the console I don't really need to see it in game anyways. Setting it to log every minute with such a big world seems like the way to go so I'll use that. Settings are read correctly as I tested setting the logging to 5 minutes and it does work indeed. So overall really happy with this

Kerrghan commented 3 weeks ago

And changing the logging interval mid backup and using /backup reload-config does change the logging interval correctly.

github-actions[bot] commented 3 weeks ago

This issue has been closed - fixed in 3.6 which has now been pushed to Curseforge and Modrinth.