Velero Backup Tool

BootLabs's photo
BootLabs
·Oct 12, 2022·

2 min read

Velero

Velero is an open-source tool for Kubernetes, to safely backup and restores the data in a cluster and disaster recovery of the cluster. With the help of velero, we can store the backup of EKS and volumes will store in a bucket and disk (in AWS).

Velero can be installed in the cluster using the helm chart in the velero namespace. Can check by kubectl get all -n velero

After installing velero we need to establish the connection between cluster and bucket and if disk(If need to take backup of volumes in a cluster) is required. And the credential file is required, by using this command

velero install --provider aws --image velero/velero:v1.8.0 --plugins velero/velero-plugin-for-aws:v1.4.0 --bucket <bucket_name>  --secret-file <path_of_credential_file>  --use-volume-snapshots=false<true_if_volume_required> --backup-location-config region=<region_of_the_bucket>

It will take a backup of the cluster or a particular namespace that can be backuped up based on the requirement, these backups will be stored.

velero backup create t2 (-n <name space name> if required)

These backups will be replaced when the cluster gets destroyed or some deployment fails or some release has some bucks.

If the connection is established between the EKS and S3 bucket

velero restore create <restore name> --from-backup <backup name>

With the help of velero the backup can be automated using a scheduler in velero. It will work like a label selector if the command has a selector then the command will execute in the scheduled time period. It can be of Days or Months or Minutes.

velero schedule create <schedule name>  --schedule=”< time interval to take backup>“--selector app=<selector name>

The time interval contains 5 values

image.png

image.png

Author: Viswanth S

BootLabs

 
Share this