Home > Net >  It's possible to add conditions in -ttl of Velero backup?
It's possible to add conditions in -ttl of Velero backup?

Time:07-02

it's possible to add conditions in -ttl of Velero backup (backup from kubernetes clusters). For example: I have a schedule that makes backups everyday at 15:00, the -ttl of this backups is 72 hours, so in 72 hours, this backup will be deleted. Which is the problem? The problem is if the cluster is not up for 3 days, the backups will be deleted after it turns on, and there are will not be any backup left. I need to create a backup with -ttl 72 hours only if there are 3 backups or more in the blob storage. It's possible with Velero?

CodePudding user response:

please use this below command has been used 72hrs backup only.

velero create schedule newschedule  --schedule="*/5 * * * *" --snapshot-volumes --include-namespaces=default --volume-snapshot-locations=<SNAPSHOT_LOCATION>

To check this command:

velero schedule get

Make sure snapshot location must be same example/06-local-volumesnapshotlocation.yaml.

Sample output of the above command :

NAME            STATUS    CREATED                         SCHEDULE      BACKUP TTL   LAST BACKUP   SELECTOR
newschedule     Enabled   2022-06-30 15:15:39  0530 IST   */5 * * * *   720h0m0s     5m ago        <none>

For your Reference :

openebs/velero-plugin

Back Up and Restore a Kubernetes Cluster Using Velero

CodePudding user response:

you can go ahead and create a schedule.

Setting up the schedule

"Back up my cluster every day at 7 am"

velero schedule create every-day-at-7 --schedule "0 7 * * *"
  • Related