# AWX backup and restore not working.

**URL:** <https://forum.ansible.com/t/awx-backup-and-restore-not-working/44768>\
**Category:** Get Help\
**Tags:** awx, kubernetes\
**Created:** [October 31, 2025, 9:29am UTC](https://forum.ansible.com/t/awx-backup-and-restore-not-working/44768 "2025-10-31T09:29:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ggiinnoo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ggiinnoo/32/9743_2.png) [@ggiinnoo](https://forum.ansible.com/u/ggiinnoo)\
**Post date:** [October 31, 2025, 9:29am UTC](https://forum.ansible.com/t/awx-backup-and-restore-not-working/44768/1 "2025-10-31T09:29:34Z")

</div>

For a better part of 8 hours i have been trying to restore a backup i have to a new env.  
The old env is a digital ocean setup and the new one a k3s single node.

The backup has been created with the following file:

```auto
---
apiVersion: awx.ansible.com/v1beta1
kind: AWXBackup
metadata:
  name: awxbackup-20250121
  namespace: awx
spec:
  deployment_name: awx-deployments

```

And after creating a temp pod and grabbing the backup i get 3 files:

```auto
 -rw-r--r--@ 1 REDACTED REDACTED 2662 Oct 10 08:42 awx_object
 -rw-r--r--@ 1 REDACTED REDACTED 18573 Oct 10 08:42 secrets.yml
 -rw-r--r--@ 1 REDACTED REDACTED 995910808 Oct 10 08:42 tower.db

```

which looks good!

* * *

**New server**

On the new server i created a operator `kustomization.yml` with the content:

```auto
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  - github.com/ansible/awx-operator/config/default?ref=2.9.0

# Set the image tags to match the git version from above
images:
  - name: quay.io/ansible/awx-operator
    newTag: 2.9.0

# Specify a custom namespace in which to install AWX
namespace: awx

```

And it spined up fine, no issues there.

I figured out you need a AWXbackup object on the new env, so i created it:

```auto
apiVersion: awx.ansible.com/v1beta1
kind: AWXBackup
metadata:
  name: awx-backup-migration
  namespace: awx
spec:
  deployment_name: awx-deployments

```

I also created AWXrestore object with:

```auto
apiVersion: awx.ansible.com/v1beta1
kind: AWXRestore
metadata:
  name: awx-backup-restore
  namespace: awx
spec:
  deployment_name: awx_deployments
  backup_name: awx-backup-migration
  no_log: false
  force_drop_db: true

```

i then noticed the operator log is spitting out error’s which cannot be viewed because `no_log` has been set 🙃 , well no worries i might find something else i thought.. and yes..

I found in the docs you can use:

```auto
kubectl get awxbackup awx-backup-migration -o jsonpath="{.items[0].status.backupDirectory}"

```

to get a list of backups, so i thought i had the name wrong.. nope..  
The output is empty:

```auto
root@k3s:~/awx-operator# kubectl get awxbackup awx-backup-migration -o jsonpath="{.items[0].status.backupDirectory}"
root@k3s:~/awx-operator#

```

AAH! i forget to place the data in the correct location? No. I created a temp pod:

```auto
apiVersion: v1
kind: Pod
metadata:
  name: awx-backup-restore
  namespace: awx
spec:
  containers:
  - name: restore-container
    image: busybox:latest
    command: ["/bin/sh", "-c", "sleep 3600"]
    volumeMounts:
    - mountPath: /backups
      name: awx-backup-pvc
  volumes:
  - name: awx-backup-pvc
    persistentVolumeClaim:
      claimName: awx-deployments-backup-claim

```

i get into it:

```auto
kubectl exec -it awx-backup-restore -n awx -- /bin/sh

```

And behold, in the folder `/backups/` there is a folder called `awx-backup-migration` with the 3 files i mentioned above.

It’s really strange that i do not see the backup with the command mentioned earlier.  
I hope someone can tell me what i am doing wrong.

---

<div class="post-metadata">

**Author:** ![dbrennand](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dbrennand/32/7830_2.png) [@dbrennand](https://forum.ansible.com/u/dbrennand)\
**Post date:** [October 31, 2025, 11:13am UTC](https://forum.ansible.com/t/awx-backup-and-restore-not-working/44768/2 "2025-10-31T11:13:52Z")

</div>

Hi @ggiinnoo

It’s not totally clear to me from the steps you’ve sent above whether you transferred the backup files from the old cluster and staged them on a PVC in your new cluster.

@kurokobo has a really good guide in their project for restoring a backup: [awx-on-k3s/restore at main · kurokobo/awx-on-k3s](https://github.com/kurokobo/awx-on-k3s/tree/main/restore#restore-awx-using-awx-operator)

Hopefully this can help you with your restore process.
