Velero article series (3): Velero resource filtering

This article was last updated on: February 7, 2024 pm

Filter based on resources

The format is: resource.group, such as storageclasses.storage.k8s.io

For example, to exclude the following resources:

The command is as follows:

1
2
velero backup create default-all \
--exclude-resources replicasets,endpointslices.discovery.k8s.io,endpoints,events.events.k8s.io,pods,authconfigs.management.cattle.io,clusterrepos.catalog.cattle.io,clusters.management.cattle.io,csinodes.storage.k8s.io,features.management.cattle.io,settings.management.cattle.io

Filter based on NameSpace

An example of a command is as follows:

1
2
3
velero schedule create default-exclude-rancher-daily \ 
--schedule="@every 24h" \
--exclude-namespaces c-m-2hpl28vh,c-m-xgr56lxz,cattle-dashboards,cattle-fleet-clusters-system,cattle-fleet-local-system,cattle-fleet-system,cattle-global-data,cattle-global-nt,cattle-impersonation-system,cattle-resources-system,cattle-system,cluster-fleet-default-home-k3s-e7c0722dc658,cluster-fleet-default-multicloud-k3s-6c520ab37e6d,cluster-fleet-local-local-1a3d67d0a899,fleet-default,fleet-local,local,p-67tgc,p-6bnxt,p-dj2vc,p-k77t2,p-lzt79,p-qrjhz,p-zlf9l,p-zpwst,user-5rvgp

Perform regular backups

As above, the command is as follows:

1
2
velero schedule create default-exclude-rancher-daily \
--schedule="@every 24h"

Series of articles

📚️ Reference documentation


Velero article series (3): Velero resource filtering
https://e-whisper.com/posts/8470/
Author
east4ming
Posted on
May 25, 2022
Licensed under