SF-Sudio / ServerBackup

GNU General Public License v3.0
38 stars 12 forks source link

Wrong Backup-deletion #1

Closed doppelkool closed 2 years ago

doppelkool commented 3 years ago

Hey,

so I was testing your plugin and I discovered a flaw.

So I have one world in the config and backup another world with the instant backup-command. But if I also have the backup limiter set to 5, then this separate world is included in this cycle of deletion. Should the plugin not test which worlds are in the config and also only include these in this cycle?

Because, now after 5 more backups my world, which I separately backed up, will be deleted, what you actually not want to happen.

I have not tested, what happens if you have multiple worlds in the config, 'cause I do want to backup one world every week, but a seperate one manually (no pattern).

SF-Sudio commented 3 years ago

Hey, thank you for testing the plugin and for letting me know about this issue.

To clarify the issue: The automatic deletion of backups should save storage space, as some worlds can take serveral gigabytes in size. So, if it were like you described and an server admin only wants to make manual backups, he also must delete old ones manually and that would be inefficient. I want server admins to save work and time with this plugin. But I also believe that the problem you pointed out could be prevented, so I will figure something out in the next update. At this time I think about a config setting like "Do not delete unique backups" or something like that. That would solve the issue you pointed out.

I will take care of it in the next update! Until then you can manually drag the backup that should not get deleted out of the backup folder to another location to prevent the backup from getting deleted.

SF-Sudio commented 2 years ago

Added "KeepUniqueBackups" to config.yml in the latest update - this should fix your issue, if you enable this feature.