Feature request - Add detection of snapshots as part of cleanup
mattmattox opened this issue · 5 comments
Right now, the cleanup will delete etcd snapshots from an etcd node. This causes issues if the cluster doesn't have backups on another node or S3.
We should detect if we see snapshots, it should throw a warning and ask "Y/N" if they are sure. Or maybe give an option to move them something else like current working dir.
I would even argue the default behaviour should be not to delete etcd snapshots (perhaps with a printed message that it won't delete them) and with the option to delete them via an additional flag to the script
Agreed so something like this:
"We have detected etcd snapshots, would you like to backup them first? Y/N"
If the user enters Y, then we copy the snapshots into another folder like the current dir.
If the user enters N, then we delete it.
I'll also add a flag like --delete-snapshots true with the default behavior being to not delete snapshots.
I would suggest against adding interactive questions to the script, so the user can run it non-interactively as is currently the case.
My suggestion is that the default behaviour is to leave the etcd snapshots in place, with a printed warning message e.g. etcd snapshots detected at x and left in place, to remove these re-run the script with --delete-snapshots
Looks like we've added the flag and default of keeping etcd snapshots -- #198
Where do you want to take it from here @mattmattox? I would lean towards not adding interactive prompts as well, a warning would be trivial to add to the script if you see this being useful.
Please reopen if there is anything further we should action.