Skip to content

Commit

Permalink
chore: add example for backup-config cli (apecloud#1786)
Browse files Browse the repository at this point in the history
  • Loading branch information
dengshaojiang authored Mar 6, 2023
1 parent b221ab2 commit 48bee9e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion docs/user_docs/cli/kbcli_backup-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ kbcli backup-config [flags]

```
# Enable the snapshot-controller and volume snapshot, to support snapshot backup.
kbcli backup-config --set snapshot-controller.enabled=true --set dataProtection.enableVolumeSnapshot=true
kbcli backup-config --set snapshot-controller.enabled=true
# If you have already installed a snapshot-controller, only enable the snapshot backup feature
kbcli backup-config --set dataProtection.enableVolumeSnapshot=true
# Schedule automatic backup at 18:00 every day (UTC timezone)
kbcli backup-config --set dataProtection.backupSchedule="0 18 * * *"
# Set automatic backup retention for 7 days
kbcli backup-config --set dataProtection.backupTTL="168h0m0s"
```

### Options
Expand Down
11 changes: 10 additions & 1 deletion internal/cli/cmd/backupconfig/backup_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ import (

var backupConfigExample = templates.Examples(`
# Enable the snapshot-controller and volume snapshot, to support snapshot backup.
kbcli backup-config --set snapshot-controller.enabled=true --set dataProtection.enableVolumeSnapshot=true
kbcli backup-config --set snapshot-controller.enabled=true
# If you have already installed a snapshot-controller, only enable the snapshot backup feature
kbcli backup-config --set dataProtection.enableVolumeSnapshot=true
# Schedule automatic backup at 18:00 every day (UTC timezone)
kbcli backup-config --set dataProtection.backupSchedule="0 18 * * *"
# Set automatic backup retention for 7 days
kbcli backup-config --set dataProtection.backupTTL="168h0m0s"
`)

// NewBackupConfigCmd creates the backup-config command
Expand Down

0 comments on commit 48bee9e

Please sign in to comment.