panel icon indicating copy to clipboard operation
panel copied to clipboard

Schedule backup replacement and/or deletion

Open Phyremaster opened this issue 6 years ago • 5 comments

Is your feature request related to a problem? Please describe. I love that I can schedule backups now, as my private Minecraft server has suffered from griefing and power-loss-induced world corruption in the past. It is slightly inconvenient, though, to remember to occasionally delete backups to avoid hitting the backup limit, which I have in place to prevent myself from accidentally allowing my hard drive to be filled with backups.

Describe the solution you'd like Ideally, I would like to be able to configure my schedule(s) to overwrite backups that they have created previously, perhaps with a simple toggle. I would imagine this could be done by parsing the names of all backups with the format already used by scheduled backups, and removing the newest backup whose date and time is reasonably close to the schedule's last run date and time.

Describe alternatives you've considered Either alternatively or in addition to the above, backup deletion could be added either as a new type of task or as an option in the backup task. Ideally, this would delete one backup, all backups, or a user-specified number of backups, with names matching a format string provided by the user as an option in the delete backup task. For this to work well, I would also request the option to specify the backup name format in the create backup task.

Additional context I think that schedules are very powerful, and have the potential to way more powerful in the future. I feel that this expansion of the features of backup tasks would be very useful to many users of Pterodactyl, and could allow for some really cool automation without requiring usage of the API.

Phyremaster avatar Nov 09 '20 02:11 Phyremaster

Duplicate #2536

GravityCube avatar Nov 09 '20 02:11 GravityCube

Weird, I searched the issues for "backup" and that one wasn't listed. Sorry.

Phyremaster avatar Nov 09 '20 02:11 Phyremaster

Oh, I see, I searched with the "feature request" tag and that issue doesn't have that tag.

Phyremaster avatar Nov 09 '20 02:11 Phyremaster

I'm not going to re-open this, but after reading through that issue, I don't really think that this is really a duplicate, as that one only requests backup replacement when the backup limit is reached, as opposed to this one which requests the ability to replace or delete backups based on user-defined conditions. Theoretically, if this were implemented as I have suggested, it could be possible for a user to set up separate daily, weekly, and monthly backup "rotations" on one server; this would not be possible if this is implemented as the other issue suggests. Despite this, this feature can only be implemented either this way or that way, not both, so this discussion should be limited to one open issue.

Phyremaster avatar Nov 09 '20 02:11 Phyremaster

You should comment your solution on the open issue

GravityCube avatar Nov 09 '20 03:11 GravityCube