diff --git a/docs/upgrading-from-0.8.x.md b/docs/upgrading-from-0.8.x.md new file mode 100644 index 000000000..2e9e39d22 --- /dev/null +++ b/docs/upgrading-from-0.8.x.md @@ -0,0 +1,33 @@ +# Upgrading from 0.8.x + +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 passbook to do this. + +To export data from your old instance, run this command: + +(with docker-compose) +``` +docker-compose exec server ./manage.py dumpdata -o /tmp/passbook_dump.json passbook_core.User passbook_core.Group passbook_crypto.CertificateKeyPair passbook_audit.Event +docker cp passbook_server_1:/tmp/passbook_dump.json passbook_dump.json +``` + +(with kubernetes) +``` +kubectl exec -it passbook-web-... -- ./manage.py dumpdata -o /tmp/passbook_dump.json passbook_core.User passbook_core.Group passbook_crypto.CertificateKeyPair passbook_audit.Event +kubectl cp passbook-web-...:/tmp/passbook_dump.json passbook_dump.json +``` + +After that, create a new passbook 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. + +(docker-compose) +``` +docker cp passbook_dump.json new_passbook_server_1:/tmp/passbook_dump.json +docker-compose exec server ./manage.py loaddata /tmp/passbook_dump.json +``` + +(with kubernetes) +``` +kubectl cp passbook_dump.json passbook-web-...:/tmp/passbook_dump.json +kubectl exec -it passbook-web-... -- ./manage.py loaddata /tmp/passbook_dump.json +``` + +Now, you should be able to login to the new passbook instance, and migrate the rest of the data over. diff --git a/mkdocs.yml b/mkdocs.yml index c322cc8ca..cb31d86a1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -5,27 +5,28 @@ copyright: "Copyright © 2019 - 2020 BeryJu.org" nav: - Home: index.md - Installation: - - Installation: installation/install.md - - docker-compose: installation/docker-compose.md - - Kubernetes: installation/kubernetes.md + - Installation: installation/install.md + - docker-compose: installation/docker-compose.md + - Kubernetes: installation/kubernetes.md - Sources: sources.md - Providers: providers.md - Property Mappings: - - Overview: property-mappings/index.md - - Reference: - - User Object: property-mappings/reference/user-object.md + - Overview: property-mappings/index.md + - Reference: + - User Object: property-mappings/reference/user-object.md - Factors: factors.md - Policies: - - Overview: policies/index.md - - Expression: policies/expression/index.md + - Overview: policies/index.md + - Expression: policies/expression/index.md - Integrations: - - as Provider: - - Amazon Web Services: integrations/services/aws/index.md - - GitLab: integrations/services/gitlab/index.md - - Rancher: integrations/services/rancher/index.md - - Harbor: integrations/services/harbor/index.md - - Sentry: integrations/services/sentry/index.md - - Ansible Tower/AWX: integrations/services/tower-awx/index.md + - as Provider: + - Amazon Web Services: integrations/services/aws/index.md + - GitLab: integrations/services/gitlab/index.md + - Rancher: integrations/services/rancher/index.md + - Harbor: integrations/services/harbor/index.md + - Sentry: integrations/services/sentry/index.md + - Ansible Tower/AWX: integrations/services/tower-awx/index.md + - Upgrading from v0.8.x: upgrading-from-0.8.x.md repo_name: "BeryJu/passbook" repo_url: https://github.com/BeryJu/passbook