DVDishka / Backuper

Minecraft backup plugin for Paper/Folia servers
MIT License
14 stars 0 forks source link

[IDEA]The backup period can be categorized into whether or not a player is online. #6

Closed LrbsX closed 4 months ago

LrbsX commented 5 months ago

Just describe your idea The backup mechanism can be categorized into whether the server has players or not, and then the configuration file gives the backup period for both cases. This way we can set it to backup more frequently when the server has players, and not backup or less frequently when there are no players, to save server performance. Note: The backup period when the server has players should last until one backup cycle after the last player goes offline.

DVDishka commented 5 months ago

I think about making the backupIfWorldChanged setting. It will be responsible for checking if the world has changed since the last backup before the backup at the specified moment. This way you don't need to configure an additional backupPeriod, because why would you make a backup if the world hasn't changed. Have I understood the problem correctly? Write what should be improved in this idea

LrbsX commented 5 months ago

I think about making the backupIfWorldChanged setting. It will be responsible for checking if the world has changed since the last backup before the backup at the specified moment. This way you don't need to configure an additional backupPeriod, because why would you make a backup if the world hasn't changed. Have I understood the problem correctly? Write what should be improved in this idea

I'm afraid that you can't rely on whether the world changes to detect whether a backup is made or not, and one of the simplest difficulties is that the chunks around the spawn point are force-loaded chunks that stay loaded all the time, with or without the player, and as soon as they are loaded, the world changes.

DVDishka commented 5 months ago

I think about making the backupIfWorldChanged setting. It will be responsible for checking if the world has changed since the last backup before the backup at the specified moment. This way you don't need to configure an additional backupPeriod, because why would you make a backup if the world hasn't changed. Have I understood the problem correctly? Write what should be improved in this idea > > I'm afraid that you can't rely on whether the world changes to detect whether a backup is made or not, and one of the simplest difficulties is that the chunks around the spawn point are force-loaded chunks that stay loaded all the time, with or without the player, and as soon as they are loaded, the world changes.

By checking for changes in the world, I of course mean checking to see if any player has joined the game since the last backup

DVDishka commented 5 months ago

Thus, if it is time for a backup, but no one has joined the game since the last one, this cycle will be skipped

LrbsX commented 5 months ago

Yeah, that's what I mean.

DVDishka commented 5 months ago

In your opinion, with this mode plugin should make a backup once in a specified period, just if someone was on the server in the period after the last backup or to make a backup once in a specified number of minutes of active play? That is, the backup will be made when a certain number of minutes have been played on the server since the last backup

LrbsX commented 5 months ago

Since I have used a plugin in the past which had similar functionality, but now that I think about it, I realize that I actually only need to do a backup of the world when the player is online, and since you have expressed the idea of using that method before, I followed your idea. I didn't make myself clear, so I'm sorry for the trouble.

DVDishka commented 5 months ago

Ok, i will implement it soon