# How to run the restore process from an awx backup?

**URL:** <https://forum.ansible.com/t/how-to-run-the-restore-process-from-an-awx-backup/37255>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [October 20, 2022, 11:10pm UTC](https://forum.ansible.com/t/how-to-run-the-restore-process-from-an-awx-backup/37255 "2022-10-20T23:10:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guilherme\_Torres](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guilherme\_Torres](https://forum.ansible.com/u/Guilherme_Torres)\
**Post date:** [October 20, 2022, 11:10pm UTC](https://forum.ansible.com/t/how-to-run-the-restore-process-from-an-awx-backup/37255/1 "2022-10-20T23:10:31Z")

</div>

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](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](http://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](http://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:

---

<div class="post-metadata">

**Author:** ![kurokobo1](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@kurokobo1](https://forum.ansible.com/u/kurokobo1)\
**Post date:** [October 21, 2022, 7:30am UTC](https://forum.ansible.com/t/how-to-run-the-restore-process-from-an-awx-backup/37255/2 "2022-10-21T07:30:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Guilherme\_Torres](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guilherme\_Torres](https://forum.ansible.com/u/Guilherme_Torres)\
**Post date:** [October 24, 2022, 7:18pm UTC](https://forum.ansible.com/t/how-to-run-the-restore-process-from-an-awx-backup/37255/3 "2022-10-24T19:18:26Z")

</div>

### 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.

```auto
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.

```

```auto
Thank you!

```
