Skip to content

fix(docs): backups guide for ops was enchanced#440

Open
androndo wants to merge 1 commit intomainfrom
fix/backups-configuration-guide
Open

fix(docs): backups guide for ops was enchanced#440
androndo wants to merge 1 commit intomainfrom
fix/backups-configuration-guide

Conversation

@androndo
Copy link
Contributor

@androndo androndo commented Mar 3, 2026

  • rakes has been removed
  • more useful commands added

Summary by CodeRabbit

  • Documentation
    • Updated Velero backup configuration guide: documents enabling Velero at platform level and retains tenant cluster enablement steps.
    • Replaced placeholders with concrete provider/bucket examples and added instructions to locate and verify the storage bucket and BackupStorageLocation.
    • Clarified included-resources guidance and simplified example strategy.
    • Expanded procedural steps with CLI examples to list and inspect backups, schedules, restores, CRD status, and logs.

@androndo androndo requested review from kvaps and lllamnyp as code owners March 3, 2026 14:14
@netlify
Copy link

netlify bot commented Mar 3, 2026

Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit e58174f
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/69a7bfdb62d5bb0008b7d760
😎 Deploy Preview https://deploy-preview-440--cozystack.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 project configuration.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the Velero backup guide for operations by providing clearer instructions and more practical examples. It clarifies necessary prerequisites, offers concrete configuration values for storage, and introduces a suite of useful kubectl and velero CLI commands to assist administrators in managing and verifying their backup setups. These changes aim to make the documentation more robust and user-friendly for Cozystack operators.

Highlights

  • Prerequisites Clarified: A new prerequisite was added, emphasizing the need to place the cozystack.velero component in the enabledPackages of Cozystack for Velero backups.
  • Velero Configuration Examples Enhanced: The example configuration for Velero's BackupStorageLocation was updated to explicitly use aws as the provider and BUCKET_NAME as a placeholder, making it more concrete.
  • New Utility Commands Added: Several kubectl commands were introduced to help users find the BUCKET_NAME, verify BackupStorageLocation creation, and inspect Velero CRDs and logs, improving troubleshooting and management.
  • Backup Policy Refinement: A specific labelSelector configuration was removed from the backup policy example, simplifying the configuration for certain resource types.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • content/en/docs/v1/operations/services/velero-backup-configuration.md
    • Added a new prerequisite for enabling the cozystack.velero component.
    • Updated the BackupStorageLocation example to specify aws as the provider and use <BUCKET_NAME> as a placeholder.
    • Included a kubectl command to retrieve the BUCKET_NAME from bucketclaim resources.
    • Added a kubectl command to check the status of BackupStorageLocation creation.
    • Removed a labelSelector block from the backup policy example.
    • Expanded the list of Velero CRD inspection commands to include kubectl get restores.velero.io and velero restore get.
    • Added a kubectl logs command for inspecting Velero pod logs.
Activity
  • No specific activity (comments, reviews, progress) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 3, 2026

📝 Walkthrough

Walkthrough

Enables the cozystack.velero package in platform bundles, consolidates Velero enablement into the Platform Package while keeping tenant-cluster addon toggle, replaces placeholder provider/bucket with aws/BUCKET_NAME, and adds verification kubectl/velero CLI commands and sample outputs.

Changes

Cohort / File(s) Summary
Documentation
content/en/docs/v1/operations/services/velero-backup-configuration.md
Enables cozystack.velero in bundles.enabledPackages; moves Velero prerequisite into Platform Package while retaining tenant spec.addons.velero.enabled; updates BackupStorageLocation provider to aws and bucket to BUCKET_NAME; adds instructions to find bucket via bucketclaims and verify BSL with kubectl; clarifies includedResources/VM-related comments and removes labelSelector block; expands Velero CLI and kubectl examples for listing backups, schedules, restores, fetching restore details, and inspecting Velero logs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

I nibble docs and tidy trails,
Enabled packages, clear details,
Buckets named and checks in sight,
Backups listed, restores right,
A rabbit hops — your backups light. 🐇

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title claims the backups guide 'was enchanced' [sic], but the raw summary shows comprehensive updates beyond enhancement: Velero enablement changes, BackupStorageLocation configuration updates, strategy reframing, and new procedural commands. Consider a more specific title that captures the main change, such as 'fix(docs): update Velero backup configuration guide with enhanced procedures' or 'docs: consolidate and expand Velero backup setup instructions'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/backups-configuration-guide

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@androndo androndo force-pushed the fix/backups-configuration-guide branch from f50aef5 to 5169ec2 Compare March 3, 2026 14:14
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the Velero backup documentation by adding several useful commands and updating the configuration examples. The changes are helpful, but there are a few areas that need attention, including a typo in the pull request title ('enchanced' should be 'enhanced'), some grammatical errors, and a potentially significant change in backup strategy that isn't clearly explained. Addressing these points will improve the clarity and accuracy of the documentation.

matchLabels:
apps.cozystack.io/application.Kind: '{{ .Application.kind }}'

# Resources related VMInstance
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The labelSelector was removed, which is a significant change to the backup strategy. This will cause all resources of the specified types within the namespace to be backed up, not just those matching the application kind. The new comment # Resources related VMInstance is not very descriptive and doesn't explain this change in behavior. Please clarify if this is intended. If so, consider a more explanatory comment, for example: # Back up all specified resource types in the application's namespace.

## Prerequisites

- Administrator access to the Cozystack (management) cluster.
- Placed `cozystack.velero` component in enabledPackages of Cozystack.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This new prerequisite seems redundant with the instructions on lines 12-13, which already explain how to enable Velero. Furthermore, this line uses cozystack.velero as the package name, while line 12 uses velero. This could be confusing for users. Please consider removing this line to avoid redundancy and potential confusion.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@content/en/docs/v1/operations/services/velero-backup-configuration.md`:
- Around line 70-73: Update the documentation snippets to improve grammar and
add bash fenced-code languages: change the BUCKET_NAME line to read "BUCKET_NAME
can be found with:" and mark its kubectl snippet as a bash fence, and replace
the "Check that creation was successed" text with "Check that the
BackupStorageLocation was created successfully:" and mark the associated
`kubectl get backupstoragelocation -n cozy-velero` snippet as a bash fence;
reference the BUCKET_NAME identifier and the BackupStorageLocation/kubectl
commands so the exact blocks are updated accordingly.
- Around line 208-214: Reword the section that references direct use of Velero
CRDs for idiomatic phrasing and add bash annotations to code fences: change the
opening sentence to something like "You can also use Velero CRDs (Backup,
Schedule, Restore) for advanced or recovery scenarios" and update the
three-resource fence to ```bash with the same three kubectl get commands;
similarly replace "Also useful inspect of velero logs by command:" with "You can
also inspect Velero logs with:" and mark that kubectl logs fence as ```bash;
apply the same wording/fence fixes to the other identical block referencing
Backup/Schedule/Restore at the later occurrence.
- Line 18: The doc is inconsistent: Line 12 uses bundles.enabledPackages with
value "velero" while Line 18 uses enabledPackages with "cozystack.velero", which
can confuse operators; pick one canonical key/value and update both places to
match. Replace the ambiguous occurrence so both references use the exact same
configuration key and package identifier (either bundles.enabledPackages: velero
or enabledPackages: cozystack.velero), and make any surrounding explanatory text
reflect that single chosen form (search for "bundles.enabledPackages",
"enabledPackages", "velero", and "cozystack.velero" to locate the lines to
change).

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e1d6350 and 5169ec2.

📒 Files selected for processing (1)
  • content/en/docs/v1/operations/services/velero-backup-configuration.md

@androndo androndo force-pushed the fix/backups-configuration-guide branch from 5169ec2 to e05d0aa Compare March 3, 2026 14:41
@myasnikovdaniil
Copy link
Contributor

@androndo androndo force-pushed the fix/backups-configuration-guide branch from e05d0aa to f1b8892 Compare March 4, 2026 05:03
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
content/en/docs/v1/operations/services/velero-backup-configuration.md (1)

74-74: ⚠️ Potential issue | 🟡 Minor

Use kubectl instead of shell alias in docs commands.

k get ... depends on a local alias and is not portable for operators following the guide verbatim. Prefer the full command form.

Suggested doc fix
-k get BackupStorageLocation -n cozy-velero      
+kubectl get backupstoragelocation -n cozy-velero
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@content/en/docs/v1/operations/services/velero-backup-configuration.md` at
line 74, The docs use the shell alias "k" (e.g., the command string "k get
BackupStorageLocation -n cozy-velero") which is not portable; update the
example(s) to use the full kubectl command ("kubectl get BackupStorageLocation
-n cozy-velero") and scan the same file for any other occurrences of the "k "
alias and replace them with "kubectl " so all examples are portable for readers.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@content/en/docs/v1/operations/services/velero-backup-configuration.md`:
- Line 14: The documentation currently references the bundle component
identifier `cozystack.velero` in `bundles.enabledPackages`; change that
identifier to `velero` because the `cozystack.*` prefix is for Package resource
names, not bundle component identifiers. Update the sentence that mentions
`cozystack.velero` to use `velero`, and ensure the surrounding text still
references the Platform Package and the tenant-cluster instruction
(`spec.addons.velero.enabled` on the `Kubernetes` resource) unchanged so readers
get the correct component name and the existing tenant-cluster enablement
guidance.

---

Duplicate comments:
In `@content/en/docs/v1/operations/services/velero-backup-configuration.md`:
- Line 74: The docs use the shell alias "k" (e.g., the command string "k get
BackupStorageLocation -n cozy-velero") which is not portable; update the
example(s) to use the full kubectl command ("kubectl get BackupStorageLocation
-n cozy-velero") and scan the same file for any other occurrences of the "k "
alias and replace them with "kubectl " so all examples are portable for readers.

ℹ️ Review info
Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: babd6774-9ea5-4814-9230-9eedb7d8680e

📥 Commits

Reviewing files that changed from the base of the PR and between 5169ec2 and f1b8892.

📒 Files selected for processing (1)
  • content/en/docs/v1/operations/services/velero-backup-configuration.md


- Administrator access to the Cozystack (management) cluster.
- S3-compatible storage: if you want to store backups in Cozy you need enable SeaweedFS and create a Bucket or can use another external S3 service.
- Enable disabled by default component `cozystack.velero` in `bundles.enabledPackages` of the [Platform Package]({{% ref "/docs/v1/operations/configuration/platform-package" %}}). And for **tenant clusters**, set `spec.addons.velero.enabled` to `true` in the `Kubernetes` resource.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify canonical package identifier for velero in Platform Package docs
set -euo pipefail

echo "== Locate platform-package documentation =="
fd -i 'platform-package' content --type f

echo
echo "== Search for enabledPackages references with context =="
rg -n -C3 'enabledPackages' content/en/docs --type md | head -100

echo
echo "== Search for cozystack.velero references =="
rg -n 'cozystack\.velero' content/en/docs --type md

echo
echo "== Check velero package identifier patterns =="
rg -n 'velero' content/en/docs/v1/operations/configuration --type md | grep -E '(enabledPackages|packages|identifier|cozystack)'

Repository: cozystack/website

Length of output: 7439


🏁 Script executed:

#!/bin/bash
# Deeper verification of package identifier format
set -euo pipefail

echo "== Search for velero package identifier in all docs =="
rg -n 'velero' content/en/docs --type md | grep -i 'package\|identifier\|enabled\|disable'

echo
echo "== Check platform-package.md for component/package naming guidance =="
cat -n content/en/docs/v1/operations/configuration/platform-package.md | head -150

echo
echo "== Search for other 'cozystack.' prefix patterns =="
rg -n 'cozystack\.[a-z-]+' content/en/docs --type md

Repository: cozystack/website

Length of output: 35972


🏁 Script executed:

#!/bin/bash
# Final verification: check components.md to see how bundle packages are documented
set -euo pipefail

echo "== Extract component naming from components.md =="
rg -A 20 'enable and disable bundle components' content/en/docs/v1/operations/configuration/components.md | head -50

Repository: cozystack/website

Length of output: 110


Use velero instead of cozystack.velero in bundles.enabledPackages.

All other bundle components use simple identifiers (e.g., gpu-operator, nfs-driver, hetzner-robotlb). The cozystack.* prefix is reserved for Package resource names, not bundle component identifiers. Line 14 should reference velero, not cozystack.velero.

🧰 Tools
🪛 LanguageTool

[grammar] ~14-~14: Use a hyphen to join words.
Context: ...xternal S3 service. - Enable disabled by default component cozystack.velero in ...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@content/en/docs/v1/operations/services/velero-backup-configuration.md` at
line 14, The documentation currently references the bundle component identifier
`cozystack.velero` in `bundles.enabledPackages`; change that identifier to
`velero` because the `cozystack.*` prefix is for Package resource names, not
bundle component identifiers. Update the sentence that mentions
`cozystack.velero` to use `velero`, and ensure the surrounding text still
references the Platform Package and the tenant-cluster instruction
(`spec.addons.velero.enabled` on the `Kubernetes` resource) unchanged so readers
get the correct component name and the existing tenant-cluster enablement
guidance.

Signed-off-by: Andrey Kolkov <androndo@gmail.com>
@androndo androndo force-pushed the fix/backups-configuration-guide branch from f1b8892 to e58174f Compare March 4, 2026 05:15
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
content/en/docs/v1/operations/services/velero-backup-configuration.md (1)

14-14: ⚠️ Potential issue | 🟠 Major

Use the canonical bundle component name in bundles.enabledPackages (Line 14).

cozystack.velero here conflicts with the documented bundle component naming pattern; this should be velero to avoid enabling the wrong thing.

Suggested fix
-- Enable disabled by default component `cozystack.velero` in `bundles.enabledPackages` of the [Platform Package]({{% ref "/docs/v1/operations/configuration/platform-package" %}}). And for **tenant clusters**, set `spec.addons.velero.enabled` to `true` in the `Kubernetes` resource.
+- Enable the disabled-by-default component `velero` in `bundles.enabledPackages` of the [Platform Package]({{% ref "/docs/v1/operations/configuration/platform-package" %}}). For **tenant clusters**, set `spec.addons.velero.enabled` to `true` in the `Kubernetes` resource.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@content/en/docs/v1/operations/services/velero-backup-configuration.md` at
line 14, Replace the non-canonical bundle component name "cozystack.velero" with
the canonical "velero" in the bundles.enabledPackages example (change
occurrences of cozystack.velero → velero) and ensure the doc still instructs
tenant clusters to set spec.addons.velero.enabled: true on the Kubernetes
resource so the correct component is enabled.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@content/en/docs/v1/operations/services/velero-backup-configuration.md`:
- Line 107: Both instances of the "strategy" sentence are ungrammatical; update
the wording where it currently reads "A **strategy** describes [Velero
Backup]... template. It is a reusable template referenced by BackupClasses." to
a single clear sentence such as "A **strategy** describes a Velero Backup
template; it is a reusable template referenced by BackupClasses." Locate the two
occurrences of that sentence (the one mentioning Velero Backup and the one
referencing BackupClasses) and replace them with the tightened, grammatically
correct phrasing.
- Around line 72-75: Replace the shell alias usage in the docs example by using
the full kubectl command: change the example "k get BackupStorageLocation -n
cozy-velero" to "kubectl get backupstoragelocation -n cozy-velero" (use the
explicit kubectl binary and the canonical lowercase resource name
BackupStorageLocation/backupstoragelocation as shown in the snippet) so readers
can copy-paste reliably in environments without a "k" alias.

---

Duplicate comments:
In `@content/en/docs/v1/operations/services/velero-backup-configuration.md`:
- Line 14: Replace the non-canonical bundle component name "cozystack.velero"
with the canonical "velero" in the bundles.enabledPackages example (change
occurrences of cozystack.velero → velero) and ensure the doc still instructs
tenant clusters to set spec.addons.velero.enabled: true on the Kubernetes
resource so the correct component is enabled.

ℹ️ Review info
Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5a15ae0e-9523-47d0-9e3d-d10622f8955a

📥 Commits

Reviewing files that changed from the base of the PR and between f1b8892 and e58174f.

📒 Files selected for processing (1)
  • content/en/docs/v1/operations/services/velero-backup-configuration.md

Comment on lines +72 to +75
Check that creation was successful:
```bash
k get BackupStorageLocation -n cozy-velero
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Avoid shell alias in docs command examples (Line 74).

k get ... is often not available in fresh operator environments. Use explicit kubectl in docs for copy-paste reliability.

Suggested fix
 Check that creation was successful:
 ```bash
-k get BackupStorageLocation -n cozy-velero    
+kubectl get backupstoragelocation -n cozy-velero
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @content/en/docs/v1/operations/services/velero-backup-configuration.md around
lines 72 - 75, Replace the shell alias usage in the docs example by using the
full kubectl command: change the example "k get BackupStorageLocation -n
cozy-velero" to "kubectl get backupstoragelocation -n cozy-velero" (use the
explicit kubectl binary and the canonical lowercase resource name
BackupStorageLocation/backupstoragelocation as shown in the snippet) so readers
can copy-paste reliably in environments without a "k" alias.


</details>

<!-- fingerprinting:phantom:triton:hawk -->

<!-- This is an auto-generated comment by CodeRabbit -->

## 2. Define a backup strategy

A **strategy** describes *what* is backed up and with which Velero options. It is a reusable template referenced by BackupClasses.
A **strategy** describes [Velero Backup](https://velero.io/docs/v1.17/api-types/backup/) template. It is a reusable template referenced by BackupClasses.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Tighten wording for clarity in strategy section (Line 107, Line 135).

Two phrases are ungrammatical and can be clarified.

Suggested fix
-A **strategy** describes [Velero Backup](https://velero.io/docs/v1.17/api-types/backup/) template. It is a reusable template referenced by BackupClasses.
+A **strategy** describes a [Velero Backup](https://velero.io/docs/v1.17/api-types/backup/) template. It is a reusable template referenced by BackupClasses.
@@
-      # Resources related VMInstance
+      # Resources related to VMInstance

Also applies to: 135-135

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@content/en/docs/v1/operations/services/velero-backup-configuration.md` at
line 107, Both instances of the "strategy" sentence are ungrammatical; update
the wording where it currently reads "A **strategy** describes [Velero
Backup]... template. It is a reusable template referenced by BackupClasses." to
a single clear sentence such as "A **strategy** describes a Velero Backup
template; it is a reusable template referenced by BackupClasses." Locate the two
occurrences of that sentence (the one mentioning Velero Backup and the one
referencing BackupClasses) and replace them with the tightened, grammatically
correct phrasing.

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.

2 participants