I would like to understand how to backup and restore my postgres DB from one cluster to another.
My environment:
I am running AWX 23.7.0
I presently have two K8s clusters running.
AWX is running successfully in both clusters.
I set my CNAME in DNS so that users login to the correct instance.
postgres is running as part of an operator deployment where storage is configured on one of the specific nodes.
kubectl label nodes gsil-kube03.idm.gsil.org nodefor=psql (old cluster)
kubectl label nodes gsil-kube06.idm.gsil.org nodefor=psql (new cluster)
I want to backup and restore my data to the new cluster. I have been reading through documentation: AWX Operator Role - Backup My understanding is that this role will backup my postgres data (among other things). I am unclear how this role can be used to restore data. Is there some documentation elsewhere that I can refer to?
Thank you for the links. I have read through everything and tried to understand as much as possible. I have my pv, pvc created for the backup. I applied the correct chown and chmod commands to the folders. I created backup manifest file like this:
---
apiVersion: awx.ansible.com/v1beta1
kind: AWXBackup
metadata:
name: awxbackup-2024-08-06
namespace: awx
spec:
deployment_name: awx-operator-controller-manager
I then applied the manifest to my cluster. That went ok, no errors. I don’t see anything in my backup folder. When running Next steps to troubleshoot this?
Klaas
(Klaas)
August 6, 2024, 3:05pm
4
I think you need to defined backup_pvc as well, and maybe also clean_backup_on_delete
That is what was needed. I added those two extra parameters. Now the playbook completes with a failure.
PLAY RECAP *********************************************************************
localhost : ok=13 changed=1 unreachable=0 failed=1 skipped=8 rescued=0 ignored=0
----------
{"level":"error","ts":"2024-08-06T16:59:09Z","msg":"Reconciler error","controller":"awxbackup-controller","object":{"name":"awxbackup-08-05-2024","namespace":"awx"},"namespace":"awx","name":"awxbackup-08-05-2024","reconcileID":"746a5fdc-2c6d-4fef-9af0-71f4d4ba8722","error":"event runner on failed","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:329\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:274\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:235"}
{"level":"info","ts":"2024-08-06T16:59:10Z","logger":"logging_event_handler","msg":"[playbook debug]","name":"awxbackup-08-05-2024","namespace":"awx","gvk":"awx.ansible.com/v1beta1, Kind=AWXBackup","event_type":"runner_on_ok","job":"68433906028693526","EventData.TaskArgs":""}
system
(system)
Closed
September 5, 2024, 5:13pm
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.