How to run the restore process from an awx backup?

Hello!

I’m trying to restore a backup of my awx unsuccessfully. If anyone has gone through this, could you please help me?

I made the backup using the process described here: https://github.com/kurokobo/awx-on-k3s/tree/main/backup

The following directory was created on my server containing 3 files:

/data/backup/tower-openshift-backup-2022-10-19-18:39:18 (I left this file here to serve as a source for restoration)

To simulate a restore, I did the following steps:

[root@localhost awx-on-k3s]# kubectl -n awx delete awx awx
awx.awx.ansible.com “awx” deleted
[root@localhost awx-on-k3s]# kubectl -n awx delete pvc postgres-13-awx-postgres-13-0
persistentvolumeclaim “postgres-13-awx-postgres-13-0” deleted
[root@localhost awx-on-k3s]# kubectl delete pv awx-postgres-13-volume
persistentvolume “awx-postgres-13-volume” deleted
#rm -rf /data/postgres-13

#kubectl apply -k restore
persistentvolume/awx-backup-volume unchanged
persistentvolume/awx-postgres-13-volume created
persistentvolume/awx-projects-volume unchanged
persistentvolumeclaim/awx-backup-claim unchanged
persistentvolumeclaim/awx-projects-claim unchanged

kubectl apply -f restore/awxrestore.yaml

awxrestore.awx.ansible.com/awxrestore-2022-10-19 created

The problem I encountered is that the process seems to go into a loop that never ends.

You can see the error in the log below:

Hi,

rm -rf /data/postgres-13

Have you created “/data/postgres-13” as follows after your “rm -rf /data/postgres-13” as described in the guide?
It’s required for restoration.

Hello kurokobo,I had created the “/data/postgres-13” directory before post here. I forgot to put it in the list of commands I pasted. That wasn’t the problem.

I tried a few more times without success and got a different error until it worked. I used only "backup_name: awxbackup-2022-10-19" parameter after I read your explanation.

Thank you!