HeatherComputer / AdvancedBackups

BSD 3-Clause "New" or "Revised" License
37 stars 6 forks source link

Bug report : Real-world time backups happening too frequently #89

Open TCAtrevor opened 1 month ago

TCAtrevor commented 1 month ago

Describe the bug After the server has made a backup on one of the times set by the real-world schedule, it appears to be producing them on mass based on the minimum time between backups (every 15 minutes in my case).

To Reproduce Steps to reproduce the behavior:

  1. Use my AdvancedBackups.properties file.
  2. Wait for the scheduled backup to run.
  3. After reaching one of the scheduled times (or maybe just the final time), it will begin making backups as frequently as possible with respect to the set minimum time between backups.

Expected behavior Backups should only occur at the times configured in this file (0:00, 6:00, 12:00, 18:00, on server shutdown, and if no backup has occurred in 24 hours).

Screenshots image

Versioning (please complete the following information):

Additional context Just seems like an issue in the logic checking if a backup needs to be made. I am not familiar with any of the code here, though. I have not tested very much with this.

TCAtrevor commented 1 month ago

After another day, I can confirm the issue occurs only after the final scheduled time in the config. Once the time rolls back around to 0:00, the issue stops occurring and the backups for the rest of day only happen as scheduled until after 18:00 again.

HeatherComputer commented 1 month ago

That's going to be a useful piece of info for troubleshooting - especially given the fact that I've patched a very similar bug and i imagine just wasn't able to catch this edgecase in testing.

HeatherComputer commented 1 month ago

https://github.com/HeatherComputer/AdvancedBackups/actions/runs/10972973769

This has a, in theory, functioning build. I've got tests running myself and things seem to be working fine, but it's hard to tell right now.

TCAtrevor commented 1 month ago

I'll try it out tonight as well

HeatherComputer commented 1 month ago

I'll try it out tonight as well

Cool, thank you! Ofc it's worth making sure the version linked both makes backups when you configured it to, and doesn't make any outside of those times

HeatherComputer commented 1 month ago

Lol. Testing has revealed a typo with the exact opposite effect. Will produce a new build for you to test

TCAtrevor commented 1 month ago

I was just coming here now to say the issue is still occurring, lol. We both checked up on it at about the same time :p

HeatherComputer commented 1 month ago

https://github.com/HeatherComputer/AdvancedBackups/actions/runs/10976690663 is building now - that'll take approximately ten minutes before downloads are available. (Edit - now available, 7 minutes after the original comment)

It is also worth noting that this jar does output a saving enabled - backup complete! message at server boot despite not making a backup. That'll be sorted before this makes it into release of course, and is unrelated to this issue.

HeatherComputer commented 1 month ago

My testing has shown this as now working as intended, so i'll mark it as being fixed in the next release. Feel free to let me know if this doesn't work for you.

TCAtrevor commented 1 month ago

Sounds good, it appeared to be working last night, and the regular backups are still working right now as well. Thank you!!