how to Backup and restore ?

As subject suggest i tried to follow https://github.com/ansible/awx-operator/tree/devel/roles/backup
Im running k3s with awx-operator 0.30

created the resource and have copied the content fra awx-operator folder backup role to my awx and are attempting to run but getting following error:

“msg”: “The task includes an option with an undefined variable. The error was: ‘ansible_operator_meta’ is undefined\n\nThe error appears to be in ‘/runner/project/roles/backup/tasks/creation.yml’: line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n—\n- name: Patching labels to {{ kind }} kind\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - "{{ foo }}"\n”,

Any help would be appreciated
Trying to backup to a local folder of the host for sentral backup

Im trying to setup a daily backup of awx if that wasnt clear.
It seems that by just creating the awxbackup it puts it in /var/lib/rancher/k3s/storage/pvc-31fbeab0-7e7a-47a6-b447-00554ea48743_awx_awx-backup-claim/

But how to get it to do daily backup and rotate backups?

torsdag 20. oktober 2022 kl. 10:15:42 UTC+2 skrev V!:

Hi,

Take a look here for inspiration:

https://github.com/antuelle78/awx-install-on-k3s#backup-awx-instance

https://github.com/kurokobo/awx-on-k3s

Regards,

antuelle78

Hi
Thank you for the links. Does the antuelle version need anything installed on the k3s host? or is it a playbook that can be run from ansible within k3s itsself?

torsdag 20. oktober 2022 kl. 10:25:04 UTC+2 skrev m.ne…@cityscoot.eu:

Hi,

You can import the “antuelle version” into your awx as a project and setup templates, schedules to run it.

It’s possible that some tasks will appear to have failed if awx is backing up itself, but the backup will be created.

For best results, maybe setup a cron job on k3s node to execute the backup task or target the k3s node from another host.

Hope that helps

Regards,