Add backup and restore commands
Description
Currently, only a subset of tables are able to be exported through the Authelia cli. This currently includes 2fa credentials (webauthn/totp) and user identifiers. An admin should be able to backup the entire stored state of Authelia and restore it from scratch using the cli.
Use Case
Taking backups of the Authelia database without having to use external tools to manually backup the database itself.
This would also:
- allow an easy migration path between the various storage backends (sqlite, postgres, mysql)
- allow schema migrations to perform automated backups of the database prior to starting migrations
Details
Allow an admin to run authelia storage export --config config.yml --output-file backup.file which results in a backup file (undetermined format) which can be imported (authelia storage import) to restore the data.
Documentation
No response
Generative AI
No
Pre-Submission Checklist
I agree to follow the Code of Conduct
I have checked for related issues and checked the documentation
Source: authelia/authelia