https://github.com/mmartofel/oadp-backup
This demo provides demonstration scripts for OADP (Red Hat OpenShift API for Data Protection)
https://github.com/mmartofel/oadp-backup
backup kubernetes oadp openshift openshift-backup openshift-oadp velero
Last synced: 7 months ago
JSON representation
This demo provides demonstration scripts for OADP (Red Hat OpenShift API for Data Protection)
- Host: GitHub
- URL: https://github.com/mmartofel/oadp-backup
- Owner: mmartofel
- Created: 2024-08-01T10:16:26.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-13T16:39:12.000Z (11 months ago)
- Last Synced: 2025-01-25T05:34:51.924Z (9 months ago)
- Topics: backup, kubernetes, oadp, openshift, openshift-backup, openshift-oadp, velero
- Language: Shell
- Homepage:
- Size: 4.55 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Red Hat OpenShift API for Data Protection
### This repo is to showcase OAPD which is the simplest way to do backups at Red Hat OpenShift with Velero and very local instance of Minio S3 to provide necessary object storage
> [!NOTE]
> Red Hat OpenShift Data Foundation provides you File, Block, and Object storage capabilities on Red Hat OpenShift cluster without additional software. ODF is not part of the following practice but worth rememebering for production deployments.#### Let's get it go!
Once you have your OpenShift cluster ready please login with admin credentials first.
Login to you desired Red Hat OpenShift cluster, for exmple:
`` oc login --token=sha256~[YOUR_TOKEN] --server=https://[YOUR_API_ROUTE]:6443 ``
Clone this repo and create all required projects and example application to backup which is persistent Postgres (actually there is only two namespaces named minio and app-core that hold all of this scenario):
```
oc apply -k ./
```
Install OADP operator using 'Operator Hub' as shown at the picture below, apply all to default settings:
Installed OADP operator should successfully apear at 'openshift-adp' namespace:

Open it to check provided API's:

Login to your newly created Minio S3 (user: minio password: minio123) and create bucket named 'backups':

Create Minio credentials secret and DataProtectionApplication:
```
oc apply -k ./adp
```Check objects created at OADP operator 'All instances' tab:

Now you are ready to create your first backup!
```
oc apply -f ./backup-restore/app-core-backup.yaml
```At the OADP operator 'Backups' tab you shoud see your first backup completed:

Backup files are located at your Minio S3 at the path backups/velero/backups/app-core-backup

So, we have a backup let's delete our application namespace:
```
oc delete project app-core
```But once we have our backup we can always restore it:
```
oc apply -f ./backup-restore/app-core-restore.yaml
```Again, heading OADP operator 'Restore' tab you shoud see your first restore completed:

Your whole app-core namespace together with all objects persisted is back again!

Many thanks for being with me during this simple practice with OADP!