panel icon indicating copy to clipboard operation
panel copied to clipboard

Backups Removed on Server Deletion

Open BloomVPS opened this issue 4 years ago • 19 comments

Is your feature request related to a problem? Please describe. When a server is deleted/terminated, the backups remain. This is when the S3 filesystem is configured.

Describe the solution you'd like It would be nice to have all backups removed when a server is deleted. For those of us using S3 or off-site filesystems, this will save on storage costs.

Describe alternatives you've considered n/a

Additional context I have only configured my install using S3 backup filesystems. I am not sure if this issue is present using local storage.

BloomVPS avatar Oct 20 '20 14:10 BloomVPS

A toggle in the delete popup might be a good solution. And also a parameter on the delete server API endpoint.

schrej avatar Oct 20 '20 14:10 schrej

Yeah, this is going to be a must for me. I'll try to get this done this week or next week at the latest.

alliraine avatar Oct 22 '20 02:10 alliraine

This seems to still be an issue. Backups on my S3 don't get deleted on server termination.

kjartanhr avatar Apr 07 '21 15:04 kjartanhr

Seeing as it isn't closed and there has been no activity, yes, it is going to still be an issue. ;)

DaneEveritt avatar Apr 07 '21 15:04 DaneEveritt

Seeing as it isn't closed and there has been no activity, yes, it is going to still be an issue. ;)

Yeah sorry you're right, I just wanted to add to the conversation that more people have this issue. I should've phrased it differently.

kjartanhr avatar Apr 07 '21 15:04 kjartanhr

Backups are not deleted also on local machine

anondev-sudo avatar Oct 02 '21 08:10 anondev-sudo

There should be option if you want to keep backups after server deletion (using admin area or api). That option should be disabled by default and backups should be deleted.

That option should be editable in Panel Settings in admin area.

anondev-sudo avatar Jan 27 '22 12:01 anondev-sudo

Is there no Artisan commands to cleanup deleted backups? 😬

snaildos avatar Feb 11 '22 07:02 snaildos

There isn't. Artisan is provided by Laravel, and the backup functionality is a custom solution made by the Pterodactyl team, which has created custom artisan commands. However, there are currently no command to prune server backups.

FoksVHox avatar Feb 11 '22 09:02 FoksVHox

Yeah, but there should be at-least an prune command to prune all backups that failed/deleted servers.

snaildos avatar Feb 12 '22 17:02 snaildos

What happens to servers that have already been deleted, backups will just sit their forever? Is there a way we can trigger some sort of cleanup job? Regarding PR #3902

snaildos avatar Mar 29 '22 14:03 snaildos

Very surprised to see that this isn't already implemented. There's no way to delete backups after a server has been deleted, right? That means any backups from a deleted server will sit on the disk indefinitely and waste storage space.

It doesn't even have to delete backups instantly after a server is deleted, all we need is a background worker that runs a query to find existing backups whose servers don't exist anymore, and delete them.

Technoguyfication avatar Dec 13 '22 04:12 Technoguyfication

Yeah there could be setting if backups should be deleted or not and in what time after the server was deleted. That you can set it for example to store backups for 90 days after server has been deleted (so you can restore it if deletion was mistake or if user wants to get the code of deleted server). This should be customisable

anondev-sudo avatar Dec 13 '22 07:12 anondev-sudo

Yeah there could be setting if backups should be deleted or not and in what time after the server was deleted. That you can set it for example to store backups for 90 days after server has been deleted (so you can restore it if deletion was mistake or if user wants to get the code of deleted server). This should be customisable

The problem with this is the scenario you're describing where you can restore a deleted server isn't even possible in the first place right now. Currently backups are only storing select server files. They're not storing server configuration, what nest or egg the server was created from, and you can't even restore them from the panel on a deleted server, so there's really no reason for backups to not be deleted with servers as there's nothing you can do with them afterwards anyways.

Technoguyfication avatar Dec 13 '22 08:12 Technoguyfication

I think that the backup system should be improved - more backup options like external FTP (SFTP), S3 (its already) and the backup settings should be changeable in admin area directly on panel, not using .env file to enable s3 backups. And each backup zip file should have .pteroconfig or something like that file where server configuration data would be saved. Then there should be option to create new server from backup

anondev-sudo avatar Dec 13 '22 09:12 anondev-sudo

Please try to avoid mixing topics in issues, it makes it very hard to keep track of tasks and feature requests. This issue is solely about deleting backups when a server is deleted.

schrej avatar Dec 13 '22 12:12 schrej

This needs to be integrated.

snaildos avatar Dec 25 '22 14:12 snaildos

up please

Maxence1502 avatar Apr 17 '23 19:04 Maxence1502

Is this feature still planned on being implemented?

memesalot avatar Mar 22 '24 05:03 memesalot