Skip to content

Commit

Permalink
Merge pull request #815 from k8up-io/change/docs
Browse files Browse the repository at this point in the history
Update docs with RWO backup feature
  • Loading branch information
Kidswiss authored Feb 28, 2023
2 parents 3bc95d2 + a0f8b60 commit 6d8ab1d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/docs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ asciidoctor_kindle_opts ?= --attribute ebook-format=kf8
vale_cmd ?= $(docker_cmd) run $(docker_opts) --volume "$${PWD}"/src/modules/ROOT/pages:/pages vshn/vale:2.6.1 --minAlertLevel=error /pages
hunspell_cmd ?= $(docker_cmd) run $(docker_opts) --volume "$${PWD}":/spell vshn/hunspell:1.7.0 -d en,vshn -l -H _public/**/**/*.html
htmltest_cmd ?= $(docker_cmd) run $(docker_opts) --volume "$${PWD}"/_public:/test wjdp/htmltest:v0.12.0
preview_cmd ?= $(docker_cmd) run --rm --publish 35729:35729 --publish 2020:2020 --volume "${PWD}":/preview/antora vshn/antora-preview:3.0.1.1 --antora=docs --style=k8up
preview_cmd ?= $(docker_cmd) run --rm --publish 35729:35729 --publish 2020:2020 --volume "${PWD}":/preview/antora vshn/antora-preview:3.1.2.2 --antora=docs --style=k8up

docs_usage_dir ?= docs/modules/ROOT/examples/usage

Expand Down
1 change: 1 addition & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* xref:explanations/system-requirements.adoc[System Requirements]
* xref:explanations/what-has-changed-in-v1.adoc[Changes in K8up v1.0]
* xref:explanations/what-has-changed-in-v2.adoc[Changes in K8up v2.0]
* xref:explanations/rwo.adoc[]
.About
* xref:about/roadmap.adoc[Roadmap]
Expand Down
13 changes: 13 additions & 0 deletions docs/modules/ROOT/pages/explanations/rwo.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
= How RWO Backups are implemented

K8s does not prevent mounting a RWO PVC to multiple pods, if they are scheduled on the same host.
K8up uses this fact to provide the ability to back up RWO PVCs.

For a given backup in a namespace K8up will list all the PVCs.
The PVCs are then grouped depending on their type:

* all RWX PVCs are grouped together
* RWO PVCs are grouped by k8s node where they are currently mounted
K8up will then deploy backup jobs according to the grouping, a single job for all RWX PVCs and a job for each K8s node.
The jobs themselves work as before, they loop over the mounted PVCs and do a file backup via restic.
2 changes: 0 additions & 2 deletions docs/modules/ROOT/pages/how-tos/prebackuppod.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

Although K8up supports xref:how-tos/application-aware-backups.adoc[executing backup commands] in already running pods, there might be a need to start a specific Pod for the backup.
Like, what if the backup command you'd like to run isn't available in the running pod?
Or maybe you want to backup something that's running on a RWO PVC?
Or perhaps you want to backup something that's outside the Kubernetes cluster, like a managed cloud database?

That's the perfect use case for using PreBackup pods!
They're Pod definitions that live in your namespaces.
Once the Operator triggers a backup for that specific namespace, then it will loop through all these Pod definitions, execute them and clean them up after the backup finished.
They allow much more flexibility, as they support everything a normal Pod template does.
For instance, you are able to set Pod affinity, so that the PreBackup Pods are started on a specific node.
That will allow you to get access to data that's RWO and then trigger backups for them via a backup command.

[source,yaml]
----
Expand Down

0 comments on commit 6d8ab1d

Please sign in to comment.