AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  AWX on AIX -- How to Backup / Restore

    Posted Thu February 09, 2023 01:40 PM
    Edited by Steve Munday Thu February 09, 2023 01:40 PM

    Team:

    I wanted to open up a discussion around the correct way to backup and restore an AWX environment.  The idea being to "duplicate" an existing environment and restore it to a (DR) instance, for example.

    I've read about tower-cli (https://www.unixarena.com/2019/03/ansible-tower-awx-installing-configuring-tower-cli.html/) and ran the "save" which worked fine.  I then did a "restore" to a different (empty) AWX instance and whilst quite a bit was restored I found that none of the hosts nor templates actually got restored.

    I'm wondering if it's simpler to backup the Postgres DB, replicate to another LPAR and then restore -- obviously this means the target LPAR already had a skeleton AWX instance.

    Look forward to sharing thoughts.

    Many thanks, Steve



    ------------------------------
    Steve Munday
    AIX, IBM i, HMC, PowerVM
    ------------------------------



  • 2.  RE: AWX on AIX -- How to Backup / Restore

    Posted Fri February 10, 2023 06:52 AM
    Edited by Andrey Klyachkin Fri February 10, 2023 06:54 AM

    Steve,

    as far as I understand, tower-cli is not supported anymore and the repo on github is archive. The new tool is called awx and can be installed with:

    pip3 install awxkit

    Can you check if it performs better for you?

    OTOH you're completely right. Almost all the data is in the database and it should be enough to back up the database together with some configuration files (/etc/tower).

    Edit: May be you should look at VM Recovery Manager or something similar for your DR solution? 



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 3.  RE: AWX on AIX -- How to Backup / Restore

    Posted Fri February 10, 2023 10:15 AM

    Andrey,

    Hi, thanks for the awxkit details which has been successfully installed.

    I tried exporting "all" however got the message "'ApiV2' object has no attribute 'execution_environments'" so had to exclude that asset from the list being exported.

    ## system #1 (EXPORT)
    # awx -k -f json export --users --organizations --teams --credential_types --credentials --notification_templates --projects --inventory --inventory_sources --job_templates --workflow_job_templates --applications --schedules > awxkit-backup.json
    
    >>> Copied the .json file to System #2
    
    ## System #2 (IMPORT)
    # awx -k -f json import --users --organizations --teams --credential_types --credentials --notification_templates --projects --inventory --inventory_sources --job_templates --workflow_job_templates --applications --schedules < awxkit-backup.json
    'ApiV2' object has no attribute 'execution_environments'
    #
    # awx -k -f json import --users --organizations --teams < awxkit-backup.json
    'ApiV2' object has no attribute 'execution_environments'
    #
    # awx -k -f json import --users < awxkit-backup.json
    'ApiV2' object has no attribute 'execution_environments'
    #

    The export then completed "ok" however even without specifying "execution_environments" on any of the import attempts I still get the issue being report.

    Have you seen similar behaviour?

    Many thanks, Steve



    ------------------------------
    Steve Munday
    AIX, IBM i, HMC, PowerVM
    ------------------------------