This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/website/docs/releases/old/v0.9.md

41 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

---
title: Release 0.9
2023-01-04 18:45:31 +00:00
slug: "/releases/0.9"
---
2020-05-16 21:46:25 +00:00
2020-12-05 21:08:42 +00:00
Due to some database changes that had to be rather sooner than later, there is no possibility to directly upgrade. You must extract the data before hand and import it again. It is recommended to spin up a second instance of authentik to do this.
2020-05-16 21:46:25 +00:00
To export data from your old instance, run this command:
- docker-compose
2020-05-16 21:46:25 +00:00
```
2020-12-05 21:08:42 +00:00
docker-compose exec server ./manage.py dumpdata -o /tmp/authentik_dump.json authentik_core.User authentik_core.Group authentik_crypto.CertificateKeyPair authentik_audit.Event otp_totp.totpdevice otp_static.staticdevice otp_static.statictoken
docker cp authentik_server_1:/tmp/authentik_dump.json authentik_dump.json
2020-05-16 21:46:25 +00:00
```
- kubernetes
2020-05-16 21:46:25 +00:00
```
2020-12-05 21:08:42 +00:00
kubectl exec -it authentik-web-... -- ./manage.py dumpdata -o /tmp/authentik_dump.json authentik_core.User authentik_core.Group authentik_crypto.CertificateKeyPair authentik_audit.Event otp_totp.totpdevice otp_static.staticdevice otp_static.statictoken
kubectl cp authentik-web-...:/tmp/authentik_dump.json authentik_dump.json
2020-05-16 21:46:25 +00:00
```
2020-12-05 21:08:42 +00:00
After that, create a new authentik instance in a different namespace (kubernetes) or in a different folder (docker-compose). Once this instance is running, you can use the following commands to restore the data. On docker-compose, you still have to run the `migrate` command, to create all database structures.
2020-05-16 21:46:25 +00:00
- docker-compose
2020-05-16 21:46:25 +00:00
```
2020-12-05 21:08:42 +00:00
docker cp authentik_dump.json new_authentik_server_1:/tmp/authentik_dump.json
docker-compose exec server ./manage.py loaddata /tmp/authentik_dump.json
2020-05-16 21:46:25 +00:00
```
- kubernetes
2020-05-16 21:46:25 +00:00
```
2020-12-05 21:08:42 +00:00
kubectl cp authentik_dump.json authentik-web-...:/tmp/authentik_dump.json
kubectl exec -it authentik-web-... -- ./manage.py loaddata /tmp/authentik_dump.json
2020-05-16 21:46:25 +00:00
```
2020-12-05 21:08:42 +00:00
Now, you should be able to login to the new authentik instance, and migrate the rest of the data over.