What Discord offers
Discord has no backup button. The server template (Server Settings, Server Template) copies the channels, roles and permissions to create a new server. It doesn't restore anything on the existing server and keeps neither the members nor their roles.
Make a backup
With AshBots, type /backup serveur. The backup saves the roles (colors, permissions, positions), the categories and channels with their permissions, and each member's roles. Messages are not backed up: Discord doesn't allow reposting them identically.
Restore after a problem
In /backup serveur, choose a backup. The bot compares it with today's server and lists what is missing. Check what needs to be put back and start. A restore never deletes anything: it recreates what is missing.
After a nuke
First remove the responsible account's permissions, otherwise it will do it again. Then restore the latest backup. So it doesn't happen again, enable /antinuke, which sanctions an account as soon as it deletes too many channels or roles.
Set it and forget it
Make a backup after every big reorganization. With Premium, a backup is made every day. The step-by-step is in back up and restore your server, and the module is on the Discord backup bot page.