Moving AWX Operator instance to new cluster with backup and restore


I am attempting to migrate my install of AWX from k3s to a new microk8s cluster using the backup and restore methods outlined in the documentation. Here are the steps I followed.

  • Old system: Created backup of existing install (ver 22.3) using the backup role. This produced a backup folder with the name “tower-openshift-backup-2024-05-24-151735” containing three files (awx_object, sercrets.yml, tower.db).
kind: AWXBackup
  name: awxbackup-2024-05-24
  namespace: awx
  deployment_name: awx
  • Old system: Created tar of backup folder.
  • New system: Created backup of new install using the backup role to generate the backup pvc and pv, (same yaml as above). The resulting backup folder name is ‘tower-openshift-backup-2024-05-24-182317’. I then moved this folder off to a different directory.
  • New system: Copied backup tar to new system and uncompressed into the location of the pv. Resulting in the folder “tower-openshift-backup-2024-05-24-151735” being created on the pvc.
  • New system: Deleted old postgres pvc and awx deployment
  • New system: Applied restore role to new install with the following:
kind: AWXRestore
  name: restore-awx
  namespace: awx
  deployment_name: awx
  backup_name: awxbackup-2024-05-24

Initially, the restore logs highlighted an issue that the backup folder did not existing, as it was looking for “tower-openshift-backup-2024-05-24-182317”. So, I renamed the folder to what it was looking for. Now I have a new error message of:

 TASK [Get AWX object definition from pvc] ********************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "/backups/tower-openshift-backup-2024-05-24-182317/awx_object does not exist in remote pod filesystem"}

All three files do exist in the directory, so I’m not sure what to check here. Where in the container would I find the backups directory?

I’m not even sure that I am on the correct path here, but this seems to be the direction the documentation indicates. Can anyone help point out what I’m doing wrong here?

Thank you very much.


I wish I could help more, but you’ve actually done more than I have with backup/restore. My first concern was moving the PVC data over from one cluster to the other, but you did that, and then fixed the filepath. So you’re doing great so far!

A couple things I can think of to check:

Have you spun up a test pod with the PVC mounted to poke around at it to see if /backups/tower-openshift-backup-2024-05-24-182317/awx_object exists, or if it got nested under a sub directory somehow?

The other thing I’d check is ownership, perhaps it’s owned by the user you extracted the tar as, but needs to be owned by whatever awx restore runs as?

Edit: Is the openshift part of the path just coincidental, or are you running on OCP? I would highly suspect ownership changing between clusters if you’re using OpenShift.

Alternatively, instead of doing a backup/restore, you might be able to “migrate” from the old AWX instance to the new one.

Thank you for the suggestions, @Denney-tech. I will try to verify that the container can see the backup files. If it does and I still have issues, then I will try the migration option you mentioned. I had seen that in the documentation before, but shied away from it.

I’ll keep you posted.