mirror of
https://github.com/pelican-dev/panel.git
synced 2026-02-28 03:13:31 +03:00
Remove backups when server is deleted #27
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Boy132 on GitHub (Apr 23, 2024).
Originally assigned to: @iamkubi on GitHub.
ref https://github.com/pterodactyl/panel/issues/2564
Wings should remove all server backups when the server is deleted. Currently they are only deleted from the panel database but the actual backup files remain.
@Mutex21 commented on GitHub (Apr 23, 2024):
I have also observed that, even if the server is deleted, backups are still present in backup pre-set location (for me it's /var/lib/pterodactyl/backups).
@Boy132 commented on GitHub (Apr 23, 2024):
Yes, that's exactly what this issue is about.
The server backups are deleted from the panel database but the actual backup files are not deleted.
@lancepioch commented on GitHub (Apr 26, 2024):
When a server is being deleted, if it has backups at all, I feel like we should just ask if they want them deleted or not.
@iamkubi commented on GitHub (Apr 26, 2024):
Seems reasonable. We'd also want to add a parameter to the delete server API call for non-interactive use.
Discussed this some and it seems like the easiest way to implement this will be in wings. As a bonus the plan is to put backups in per-server directories for easier identification. This will make it easier for admins that elect not to delete backups when the server is deleted to clean them up later.
@MennoGamed commented on GitHub (Apr 29, 2024):
I don't know if this is useful, especially with automated systems like WHMCS. In any case, there should be an option in the panel to choose whether you want to give these choices or not. Otherwise, WHMCS can delete a server nicely, but you will be permanently stuck with backup files.
@iamkubi commented on GitHub (May 9, 2024):
I have this mostly working but still need to test the s3 implementation. My plan for now is to add a wings config setting which defaults to enabled that deletes all backups for a server when that server is deleted. Admins who do not want this behavior will be able to disable it on a per-node basis and implement their own cleanup.
@Technoguyfication commented on GitHub (Feb 5, 2025):
Is deleting backups from S3 storage implemented yet? If not, I think this issue should be re-opened or another issue should be created to implement cleanup of S3 backups.
@filasik commented on GitHub (Feb 25, 2025):
Agree with you. For new users It is not the wanted experience.
@rmartinoscar commented on GitHub (Feb 25, 2025):
It is already implemented
3d764a89f7/app/Services/Backups/DeleteBackupService.php (L70-L86)