mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-06 05:25:40 +00:00
Update docs to include schedule backup example (#3478)
* update docs to include schedule backup example Signed-off-by: Abigail McCarthy <mabigail@vmware.com> * update backup name and cron schedule Signed-off-by: Abigail McCarthy <mabigail@vmware.com> * Update scheduled backups docs for review comments Signed-off-by: Abigail McCarthy <mabigail@vmware.com> * fix typo Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
This commit is contained in:
@@ -19,3 +19,44 @@ To backup resources of specific Kind in a specific order, use option --ordered-r
|
||||
velero backup create backupName --include-cluster-resources=true --ordered-resources 'pods=ns1/pod1,ns1/pod2;persistentvolumes=pv4,pv8' --include-namespaces=ns1
|
||||
velero backup create backupName --ordered-resources 'statefulsets=ns1/sts1,ns1/sts0' --include-namespaces=ns1
|
||||
```
|
||||
## Schedule a Backup
|
||||
|
||||
The **schedule** operation allows you to create a backup of your data at a specified time, defined by a [Cron expression](https://en.wikipedia.org/wiki/Cron).
|
||||
|
||||
```
|
||||
velero schedule create NAME --schedule="* * * * *" [flags]
|
||||
```
|
||||
|
||||
Cron schedules use the following format.
|
||||
|
||||
```
|
||||
# ┌───────────── minute (0 - 59)
|
||||
# │ ┌───────────── hour (0 - 23)
|
||||
# │ │ ┌───────────── day of the month (1 - 31)
|
||||
# │ │ │ ┌───────────── month (1 - 12)
|
||||
# │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday;
|
||||
# │ │ │ │ │ 7 is also Sunday on some systems)
|
||||
# │ │ │ │ │
|
||||
# │ │ │ │ │
|
||||
# * * * * *
|
||||
```
|
||||
|
||||
For example, the command below creates a backup that runs every day at 3am.
|
||||
|
||||
```
|
||||
velero schedule create example-schedule --schedule="0 3 * * *"
|
||||
```
|
||||
|
||||
This command will create the backup, `example-schedule`, within Velero, but the backup will not be taken until the next scheduled time, 3am. Backups created by a schedule are saved with the name `<SCHEDULE NAME>-<TIMESTAMP>`, where `<TIMESTAMP>` is formatted as *YYYYMMDDhhmmss*. For a full list of available configuration flags use the Velero CLI help command.
|
||||
|
||||
```
|
||||
velero schedule create --help
|
||||
```
|
||||
|
||||
Once you create the scheduled backup, you can then trigger it manually using the `velero backup` command.
|
||||
|
||||
```
|
||||
velero backup create --from-schedule example-schedule
|
||||
```
|
||||
|
||||
This command will immediately trigger a new backup based on your template for `example-schedule`. This will not affect the backup schedule, and another backup will trigger at the scheduled time.
|
||||
|
||||
@@ -24,9 +24,9 @@ Note that cluster backups are not strictly atomic. If Kubernetes objects are bei
|
||||
|
||||
## Scheduled backups
|
||||
|
||||
The **schedule** operation allows you to back up your data at recurring intervals. The first backup is performed when the schedule is first created, and subsequent backups happen at the schedule's specified interval. These intervals are specified by a Cron expression.
|
||||
The **schedule** operation allows you to back up your data at recurring intervals. You can create a scheduled backup at any time, and the first backup is then performed at the schedule's specified interval. These intervals are specified by a Cron expression.
|
||||
|
||||
Scheduled backups are saved with the name `<SCHEDULE NAME>-<TIMESTAMP>`, where `<TIMESTAMP>` is formatted as *YYYYMMDDhhmmss*.
|
||||
Velero saves backups created from a schedule with the name `<SCHEDULE NAME>-<TIMESTAMP>`, where `<TIMESTAMP>` is formatted as *YYYYMMDDhhmmss*. For more information see the [Backup Reference documentation](backup-reference.md).
|
||||
|
||||
## Restores
|
||||
|
||||
|
||||
Reference in New Issue
Block a user