Backup and restore using restic with minio

oc new-project oadp
apiVersion: v1
kind: Secret
metadata:
name: cloud-credentials
labels:
component: minio
stringData:
cloud: |
[default]
aws_access_key_id =
aws_secret_access_key =
apiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
metadata:
name: velero-sample
namespace: oadp
spec:
backupLocations:
- velero:
config:
insecureSkipTLSVerify: 'true'
profile: default
region: us-east-1
s3ForcePathStyle: 'true'
s3Url: 'https://play.min.io:9000'
credential:
key: cloud
name: cloud-credentials
default: true
objectStorage:
bucket: oadp
prefix: velero
provider: aws
configuration:
restic:
enable: true
velero:
defaultPlugins:
- aws
bash-3.2$ oc get DataProtectionApplication -n oadp
NAME AGE
velero-sample 30m
bash-3.2$ oc get pods -n oadp
NAME READY STATUS RESTARTS AGE
oadp-velero-sample-1-aws-registry-76ddbccbc6-296c4 1/1 Running
openshift-adp-controller-manager-56995d6b96-jnd8z 1/1 Running
restic-kpjbc 1/1 Running
restic-ng9fw 1/1 Running
restic-qwtng 1/1 Running
velero-658b975d8c-qs6tw 1/1 Running
oc new-project postgress-oadp
oc new-app postgresql-persistent
apiVersion: velero.io/v1
kind: Backup
metadata:
name: postgress-oadp
namespace: oadp
spec:
defaultVolumesToRestic: true
includedNamespaces:
- postgress-oadp
storageLocation: velero-sample-1
ttl: 720h0m0s
---
status:
completionTimestamp: '2022-07-27T15:33:50Z'
expiration: '2022-08-26T15:32:49Z'
formatVersion: 1.1.0
phase: Completed
progress:
itemsBackedUp: 50
totalItems: 50
startTimestamp: '2022-07-27T15:32:56Z'
version: 1
oc delete dc postgresql -n postgress-oadp
oc delete pvc postgresql -n postgress-oadp
apiVersion: velero.io/v1
kind: Restore
metadata:
name: postgress-oadp-pvc
namespace: oadp
spec:
backupName: postgress-oadp
includedResources:
- persistentvolume
- persistentvolumeclaims
- pods
restorePVs: true
status:
completionTimestamp: '2022-07-27T16:14:29Z'
phase: Completed
progress:
itemsRestored: 3
totalItems: 3
startTimestamp: '2022-07-27T16:14:05Z'

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store