Delete backups on server deletion
Is there an existing feature request for this?
- [x] I have searched the existing issues before opening this feature request.
Describe the feature you would like to see.
Currently when you delete a server, the backups of said server are not deleted. This can become an issue over time when using S3 for backups. Unused backups will accumulate in storage size, starting to cost a lot of money for backups that are basically never going to be used since they are no longer even accessible by the user.
Describe the solution you'd like.
Run function "Delete all backups" when deleting server. Or any other alternative resulting in deleted backups of server when it is being deleted.
Additional context to this request.
No response
I could have sworn this was implemented, allow me to talk with ellie about this, thanks for the report though. This is most definitely a bug.
I have not tested this with previous implementation of S3, only with the new rustic S3 implementation. Probably should of mentioned that too.
If I understand correctly the recent commit has added deletion / clean up of rustic backup repositories ( https://github.com/pyrohost/elytra/commit/541c7c3c8b317e319beca6f044479b412c0a90c2 )
I am currently using panel docker image (canary-7f8e4cac6ddf3c9269e636240e90714f0c33086e) and Elytra docker image (sha-541c7c3). I have setup S3 rustic backups and they are working fine when taking backups or individually deleting backups. An error is generated whenever I delete a server. It complains about not finding rustic config, but it is there in node config. Is there a new location the config is supposed to be?
Error:
server-node | INFO: [Nov 11 17:25:18.147] releasing exclusive lock for power action action=stop lock_id=63e86454-bf23-11f0-a596-5e4d6a9eb398 server=0588a672-229e-461a-9d29-e9e4b4873548
server-node | INFO: [Nov 11 17:25:24.111] destroying all registered sinks for server instance server=0588a672-229e-461a-9d29-e9e4b4873548
server-node | WARN: [Nov 11 17:25:24.135] failed to get rustic config for repository destruction, repository may not exist error=Get "https://panel.domain.com/api/remote/servers/0588a672-229e-461a-9d29-e9e4b4873548/rustic-config?type=local": context canceled server_id=0588a672-229e-461a-9d29-e9e4b4873548 type=local
server-node |
server-node | Stacktrace:
server-node | Get "https://panel.domain.com/api/remote/servers/0588a672-229e-461a-9d29-e9e4b4873548/rustic-config?type=local": context canceled
server-node | github.com/pyrohost/elytra/src/router.destroyServerBackupRepositories.func1
server-node | github.com/pyrohost/elytra/src/router/router_server.go:272
server-node | github.com/pyrohost/elytra/src/router.destroyServerBackupRepositories
server-node | github.com/pyrohost/elytra/src/router/router_server.go:319
server-node | runtime.goexit
server-node | runtime/asm_amd64.s:1700
server-node |
server-node |
server-node |
server-node | WARN: [Nov 11 17:25:24.136] failed to get rustic config for repository destruction, repository may not exist error=Get "https://panel.domain.com/api/remote/servers/0588a672-229e-461a-9d29-e9e4b4873548/rustic-config?type=s3": context canceled server_id=0588a672-229e-461a-9d29-e9e4b4873548 type=s3
server-node |
server-node | Stacktrace:
server-node | Get "https://panel.domain.com/api/remote/servers/0588a672-229e-461a-9d29-e9e4b4873548/rustic-config?type=s3": context canceled
server-node | github.com/pyrohost/elytra/src/router.destroyServerBackupRepositories.func1
server-node | github.com/pyrohost/elytra/src/router/router_server.go:272
server-node | github.com/pyrohost/elytra/src/router.destroyServerBackupRepositories
server-node | github.com/pyrohost/elytra/src/router/router_server.go:319
server-node | runtime.goexit
server-node | runtime/asm_amd64.s:1700
server-node |
server-node |
server-node |