skip to Main Content

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?

2

Answers


  1. 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

    Login or Signup to reply.
  2. 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 * * *"
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search