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:
Jens Langhammer 2021-09-05 20:25:42 +02:00
parent 0bae550520
commit b939ee7a09
4 changed files with 11 additions and 12 deletions

View File

@ -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`.

View File

@ -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 [...]
```

View File

@ -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.

View File

@ -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/)