RunRestoreΒΆ
A RunRestore object can be created to manually trigger a namespace restore via kubectl. Each RunRestore corresponds to a single restore task.
Please note that a restore launched from the Afi portal doesn't create the corresponding RunRestore object, instead, a RunRestore object is created only via kubectl and should have a unique name.
An example RunRestore YAML is shown below:
apiVersion: k8sbackup.afi.ai/v1alpha1
kind: RunRestore
metadata:
namespace: postgresql-restored
generateName: postgresql-
spec:
policy:
selectors: []
archiveRef: 01GM47ZVFB4KKNXPP6Z0C6AA21
pit: 1
waitStableState: true
namespacefield inmetadatasection points to a restore destination namespace. Please note that this namespace should be created before a restore, it isn't created automatically.generateNamefield is used to generate a unique name for a newRunRestoreobject.policy.selectorsfield inspecsection is used to recover specific objects from namespace backup that match the selectors (selectorsfield usage is similar to its usage in BackupPolicy settings), for example, to recover objects of a specific kind or with a specific label.archiveReffield is a backup archive identifier (you can get it by listingArchiveobjects inside a restore source namespace).pitfield (point-in-time abbreviation) is a snapshot number inside the backup archive. It may be omitted to request a restore from the most up-to-date snapshot.waitStableStatefield defines if the recovery task should wait until the restored application reaches a stable state (in particular, all StatefulSets at a desired number of replicas, all Pods ready, etc.).
You can run a restore by creating a RunRestore object as follows:
You can list restores launched to a specific namespace as follows: