website/docs: use kubectl exec with deployment, add note for backup version
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> #1349
This commit is contained in:
parent
0bae550520
commit
b939ee7a09
|
@ -17,27 +17,26 @@ Local backups can be created by running the following command in your authentik
|
|||
```
|
||||
docker-compose run --rm worker backup
|
||||
# Or for kubernetes
|
||||
kubectl exec -it authentik-worker-.... -- ./lifecycle/bootstrap.sh backup
|
||||
kubectl exec -it deployment/authentik-worker -c authentik -- ak backup
|
||||
```
|
||||
|
||||
This will dump the current database into the `./backups` folder. By defaults, the last 10 Backups are kept.
|
||||
|
||||
### Restore
|
||||
|
||||
:::warning
|
||||
Currently, it is only supported to restore backups into the same version they have been taken from. Different versions *might* work, but this is not guarantee.
|
||||
Instead, install the version the backup was taken with, restore the backup and then upgrade.
|
||||
:::
|
||||
|
||||
Run this command in your authentik installation directory
|
||||
|
||||
```
|
||||
docker-compose run --rm worker restore
|
||||
# Or for kubernetes
|
||||
kubectl exec -it authentik-worker-.... -- ./lifecycle/bootstrap.sh restore
|
||||
```
|
||||
|
||||
This will prompt you to restore from your last backup. If you want to restore from a specific file, use the `-i` flag with the filename:
|
||||
The filename can be found by either looking into the `./backups` directory or using S3.
|
||||
|
||||
```
|
||||
docker-compose run --rm worker restore -i default-2020-10-03-115557.psql
|
||||
# Or for kubernetes
|
||||
kubectl exec -it authentik-worker-.... -- ./lifecycle/bootstrap.sh restore -i default-2020-10-03-115557.psql
|
||||
kubectl exec -it deployment/authentik-worker -c authentik -- ak restore -i default-2020-10-03-115557.psql
|
||||
```
|
||||
|
||||
After you've restored the backup, it is recommended to restart all services with `docker-compose restart` or `kubectl restart deployment --all`.
|
||||
|
|
|
@ -19,5 +19,5 @@ docker-compose exec -it worker ./manage.py test_email [...]
|
|||
To run this command with Kubernetes, use
|
||||
|
||||
```
|
||||
kubectl exec -it authentik-worker-xxxxx -- ./manage.py test_email [...]
|
||||
kubectl exec -it deployment/authentik-worker -c authentik -- ./manage.py test_email [...]
|
||||
```
|
||||
|
|
|
@ -17,7 +17,7 @@ docker-compose run --rm server create_recovery_key 10 akadmin
|
|||
or, for Kubernetes, run
|
||||
|
||||
```
|
||||
kubectl exec -it authentik-web-<hash> -- ./manage.py create_recovery_key 10 akadmin
|
||||
kubectl exec -it deployment/authentik-web -c authentik -- ak create_recovery_key 10 akadmin
|
||||
```
|
||||
|
||||
This will output a link, that can be used to instantly gain access to authentik as the user specified above. The link is valid for amount of years specified above, in this case, 10 years.
|
||||
|
|
|
@ -11,7 +11,7 @@ If it does, you can run the following command to ensure all permissions exist:
|
|||
```
|
||||
docker-compose run --rm worker repair_permissions
|
||||
# Or for kubernetes
|
||||
kubectl exec -it authentik-worker-.... -- ak repair_permissions
|
||||
kubectl exec -it deployment/authentik-worker -c authentik -- ak repair_permissions
|
||||
```
|
||||
|
||||
If the error persists after running this command, please open an Issue on [GitHub](https://github.com/goauthentik/authentik/issues/)
|
||||
|
|
Reference in New Issue