Skip to content

website/docs: sys mgmt: document authentik backups/restoration#12943

Merged
tanberry merged 19 commits intogoauthentik:mainfrom
dominic-r:sdko/docs/sys-mgmt/backup-authentik
Mar 7, 2025
Merged

website/docs: sys mgmt: document authentik backups/restoration#12943
tanberry merged 19 commits intogoauthentik:mainfrom
dominic-r:sdko/docs/sys-mgmt/backup-authentik

Conversation

@dominic-r
Copy link
Member

@dominic-r dominic-r commented Feb 6, 2025

What?

This PR adds general documentation to backup authentik: the postgres database, the redis instance, and static directories.

Closes

Closes #8411

  • The documentation has been updated
  • The documentation has been formatted (make website)

Signed-off-by: Dominic R <dominic@sdko.org>
@netlify
Copy link

netlify bot commented Feb 6, 2025

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 609f7e7
🔍 Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/67cb5e29eac2b0000869c323
😎 Deploy Preview https://deploy-preview-12943--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Feb 6, 2025

Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit 609f7e7
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/67cb5e2951d37700089b0b39

@codecov
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.70%. Comparing base (a07ce35) to head (609f7e7).
Report is 23 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12943      +/-   ##
==========================================
+ Coverage   92.68%   92.70%   +0.02%     
==========================================
  Files         793      793              
  Lines       40347    40364      +17     
==========================================
+ Hits        37395    37421      +26     
+ Misses       2952     2943       -9     
Flag Coverage Δ
e2e 47.94% <ø> (+0.03%) ⬆️
integration 24.07% <ø> (-0.02%) ⬇️
unit 90.48% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rissson rissson self-requested a review February 8, 2025 11:13
@dominic-r dominic-r marked this pull request as ready for review February 8, 2025 17:47
@dominic-r dominic-r requested a review from a team as a code owner February 8, 2025 17:47
@dominic-r
Copy link
Member Author

Depends on #12962 for the Docker container names.

…d and this is the easiest no-config-change solution that works
@rissson
Copy link
Member

rissson commented Feb 8, 2025

Depends on #12962 for the Docker container names.

You don't need to, we assume in the documentation that a bunch of commands are run from the docker-compose directory.

@rissson
Copy link
Member

rissson commented Feb 8, 2025

One thing I forgot to mention, I don't want us to provide specific instructions for backing things up, but instead provide references to our dependencies respective documentation.

@dominic-r
Copy link
Member Author

One thing I forgot to mention, I don't want us to provide specific instructions for backing things up, but instead provide references to our dependencies respective documentation.

For example, linking the Postgres backup page instead of providing a command? I'm curious, is there any specific reasoning behind this? While this might simplify things for us, it could ultimately create more challenges for the user, particularly those who aren’t as familiar with Postgres or Redis. There’s a risk they could end up relying on commands from unreliable third-party documentation or their own improvised solutions, which could lead to data loss or improper backups due to incorrect usage or poor practices. Wouldn’t it be safer and more effective to direct them to the official dependency documentation and provide commands?

@dominic-r
Copy link
Member Author

dominic-r commented Feb 8, 2025

This is a bit like one of my first PRs to authentik: upgrading PG from v12 to 16. We could have linked pg_restore/pg_dump/pg_whateverelse docs but instead we provided a step-by-step with postgres commands.

@tanberry tanberry changed the title docs: sys mgmt: document authentik backups website/docs: sys mgmt: document authentik backups Feb 10, 2025
@rissson
Copy link
Member

rissson commented Feb 10, 2025

For example, linking the Postgres backup page instead of providing a command?

Exactly

I'm curious, is there any specific reasoning behind this?

There is.

First, there is the added maintenance for us. Providing specific instructions would mean that we have to maintain those, possibly for multiple versions of postgres (for instance the helm chart and the docker-compose ones don't currently match). It also means that we would need to provide some level of support for issues and questions coming in. We currently don't have that kind of bandwidth.

Backing things up (whether it's postgres, redis, files, or whatever else) is never easy and straightforward. Providing commands would make it look like it is, but it isn't. There are many other things to consider, like the fact that we also need to backup users and their password so that on restore.

While on the topic of restoration, we would also need to provide additional instructions for that.

We also need to consider that using the provided postgres/redis setup with the docker-compose and helm chart is not the way everyone runs authentik.

I would much rather have explanations of what needs to be backed up, why it needs to be backed up, and solid pointers to resources explaining how to do it, instead of us trying to "make things up" even though it isn't our expertise.

There’s a risk they could end up relying on commands from unreliable third-party documentation or their own improvised solutions

Not our problem. Seriously. I know it sounds harsh, but if anyone is running an application (authentik or else) and rely on that data without having 1. learned how to do backups and 2. proper setup and testing of said backups, they shouldn't be running that application.

Which is why I want us to point people in the right direction, with links to references of the upstream backup documentation for example.

@dominic-r
Copy link
Member Author

dominic-r commented Feb 14, 2025

sorry for taking a while to get to this. I've implemented your suggestions in e3292ee . Hope I wasn't too specific or vague on certain points. Restoration docs is also added in b92ab8d

If you choose to keep "Restore Notes" (under "Static directories"), wording will probably have to be updated. I'm not proud of my descriptions.

@dominic-r dominic-r requested a review from rissson February 14, 2025 01:58
@dominic-r dominic-r changed the title website/docs: sys mgmt: document authentik backups website/docs: sys mgmt: document authentik backups/restoration Feb 14, 2025
Copy link
Member

@rissson rissson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall a pretty good document. I very much like the way things are laid out and organized

@dominic-r dominic-r requested a review from rissson February 17, 2025 18:15
@rissson
Copy link
Member

rissson commented Feb 21, 2025

was out sick some time this week, I'll get to this next week

@rissson rissson requested a review from tanberry March 6, 2025 10:49
Signed-off-by: Dominic R <dominic@sdko.org>
Copy link
Contributor

@tanberry tanberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for adding this important bit of How To documentation, @dominic-r !!

Signed-off-by: Dominic R <dominic@sdko.org>
@dominic-r
Copy link
Member Author

Comme toujours, c'est un plaisir! @tanberry

@tanberry tanberry merged commit 349f66e into goauthentik:main Mar 7, 2025
84 checks passed
@dominic-r dominic-r deleted the sdko/docs/sys-mgmt/backup-authentik branch March 7, 2025 21:17
@septatrix
Copy link
Contributor

Does losing the Redis data mean that pending emails are lost? For invite email that might be considered permanent data loss

@rissson
Copy link
Member

rissson commented Mar 10, 2025

Does losing the Redis data mean that pending emails are lost? For invite email that might be considered permanent data loss

That's correct. We're working on solutions to avoid those issues

@septatrix
Copy link
Contributor

Does losing the Redis data mean that pending emails are lost? For invite email that might be considered permanent data loss

That's correct. We're working on solutions to avoid those issues

Depending on far away these solutions are it would be best to correct the documentation to state that losing redis does mean losing irrecoverable state

kensternberg-authentik added a commit that referenced this pull request Mar 11, 2025
* main: (77 commits)
  web: Ignore Storybook when running codespell. (#13454)
  core: bump ruff from 0.9.9 to 0.9.10 (#13448)
  core: bump webauthn from 2.5.1 to 2.5.2 (#13449)
  website/docs: backup and restore: remove extra period (#13440)
  website: bump prismjs from 1.29.0 to 1.30.0 in /website (#13456)
  web: bump prismjs from 1.29.0 to 1.30.0 in /web (#13455)
  web: admin interface: faster card load (#13331)
  web/admin: fix display bug for assigned users in application bindings in the wizard (#13435)
  website: bump the build group across 1 directory with 9 updates (#13442)
  core: bump django from 5.0.12 to 5.0.13 (#13425)
  providers/SCIM: fix object exists error for users, attempt to look up user ID in remote system (#13437)
  website/docs: sys mgmt: document authentik backups/restoration (#12943)
  website: fix build in docker (#13430)
  website/integrations: zipline: add (#13257)
  translate: Updates for file web/xliff/en.xlf in fr (#13431)
  lifecycle/aws: bump aws-cdk from 2.1002.0 to 2.1003.0 in /lifecycle/aws (#13426)
  translate: Updates for file web/xliff/en.xlf in zh_CN (#13428)
  translate: Updates for file web/xliff/en.xlf in zh-Hans (#13429)
  core, web: update translations (#13423)
  website: add a better edit this page element (#13391)
  ...
tanberry pushed a commit that referenced this pull request Mar 12, 2025
…data (#13483)

* website/docs: ops/backup-restore: add "email invitations" to lost redis data 

Adds email invitations to the examples of data loss in the Redis section.

Resolves #12943 (comment)

Signed-off-by: Dominic R <dominic@sdko.org>

* i'm blind

Signed-off-by: Dominic R <dominic@sdko.org>

---------

Signed-off-by: Dominic R <dominic@sdko.org>
kensternberg-authentik added a commit that referenced this pull request Apr 25, 2025
* main:
  web: admin interface: faster card load (#13331)
  web/admin: fix display bug for assigned users in application bindings in the wizard (#13435)
  website: bump the build group across 1 directory with 9 updates (#13442)
  core: bump django from 5.0.12 to 5.0.13 (#13425)
  providers/SCIM: fix object exists error for users, attempt to look up user ID in remote system (#13437)
  website/docs: sys mgmt: document authentik backups/restoration (#12943)
  website: fix build in docker (#13430)
  website/integrations: zipline: add (#13257)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: How to backup and restore Authentik

4 participants