diff --git a/web/docs/usage.md b/web/docs/usage.md index 17ac3b0..bce6ae3 100644 --- a/web/docs/usage.md +++ b/web/docs/usage.md @@ -81,34 +81,13 @@ This configuration enables both WAL archiving and data directory backups. ## Performing a Base Backup -Once WAL archiving is enabled, the cluster is ready for backups. +Once WAL archiving is enabled, the cluster is ready for backups. Backups can be +created either declaratively (with YAML manifests) or imperatively (with the +`cnpg` plugin). -### Using kubectl-cnpg plugin +### Declarative approach (YAML manifest) -The quickest way to create an on-demand backup is using the kubectl-cnpg plugin: - -```bash -kubectl cnpg backup -n \ - --method=plugin \ - --plugin-name=barman-cloud.cloudnative-pg.io -``` - -:::note Migration from in-tree backup -If you're migrating from the in-tree backup system, note that the command has changed from: -```bash -# Old command (in-tree backup) -kubectl cnpg backup -n --method=barmanObjectStore -``` -to: -```bash -# New command (plugin backup) -kubectl cnpg backup -n --method=plugin --plugin-name=barman-cloud.cloudnative-pg.io -``` -::: - -### Using YAML manifests - -Alternatively, you can create a backup using a YAML manifest: +Create a backup resource by applying a YAML manifest: ```yaml apiVersion: postgresql.cnpg.io/v1 @@ -123,8 +102,28 @@ spec: name: barman-cloud.cloudnative-pg.io ``` -:::note -You can apply the same concept to the `ScheduledBackup` resource. +### Imperative approach (using the `cnpg` plugin) + +The quickest way to trigger an on-demand backup is with the `cnpg` plugin: + +```bash +kubectl cnpg backup -n \ + --method=plugin \ + --plugin-name=barman-cloud.cloudnative-pg.io +``` + +:::note Migration from in-tree backups +If you are migrating from the in-tree backup system, note the change in syntax: + +```bash +# Old command (in-tree backup) +kubectl cnpg backup -n --method=barmanObjectStore + +# New command (plugin-based backup) +kubectl cnpg backup -n \ + --method=plugin \ + --plugin-name=barman-cloud.cloudnative-pg.io +``` ::: ## Restoring a Cluster