Protection¶
A Protection
object represent a backup SLA assigned to a namespace (in other words, a namespace is protected with a backup SLA).
An example Protection
YAML is shown below:
apiVersion: k8sbackup.afi.ai/v1alpha1
kind: Protection
metadata:
name: gold
namespace: postgresql
spec:
policyRef: gold
name
field inmetadata
section should be set to a backup policy name (gold
in this example).namespace
field inmetadata
section should be set to a namespace that you want to protect.policyRef
field inspec
section points to a backup policygold
. Please note that the name of a protection must match the name of a backup policy that it selects.
You can protect a namespace with a backup policy as follows:
You can remove a protection from a namespace as follows (this command removes a backup policy gold
from a namespace postgresql
):
You can list protections for a namespace as follows: