How to Restore DB from backup file

Hello,

Can someone please help me here, not able to figure out why i am unable to run restore.yml that is provided in the bundle.

STEP 1:- I have run backup.yml and it successfully created a tar file.
STEP 2:- Then I am trying to run restore.yml and have given the full path of the file created from STEP1 (/location/Tarfilename.tar.gz) but it throws following error.

can someone please assist me?

ASK [restore : Write SECRET_KEY into /etc/*****/] ************************************************************

changed: [tnode1.runitdif.bankofamerica.com]

changed: [tnode3.XYZ.com]

changed: [tnode2.XYZ.com]

TASK [restore : Dump the new Tower instance topology] *********************************************************

skipping: [tnode2.XYZ.com]

skipping: [tnode3.XYZ.com]

changed: [tnode1.XYZ.com]

TASK [restore : Perform a PostgreSQL restore (external).] *****************************************************

skipping: [tnode2.XYZ.com]

skipping: [tnode3.XYZ.com]

fatal: [tnode1.XYZ.com]: FAILED! => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: true}

[tnode1.XYZ.com] TASK: restore : Perform a PostgreSQL restore (external). (debug)>

[tnode1.XYZ.com] TASK: restore : Perform a PostgreSQL restore (external). (debug)>

[tnode1.XYZ.com] TASK: restore : Perform a PostgreSQL restore (external). (debug)>

[tnode1.XYZ.com] TASK: restore : Perform a PostgreSQL restore (external). (debug)>

Try removing no_log from the playbook which is giving error to see what exact error it gives. It might have sensitive data hence it is censored.

Not sure what you are using to extract your tarball but here is an excerpt from my role extracting a tarball after downloading it from the internet

  • name: Downloading Apache APR sources
    get_url:
    url: “{{ apr_tarball_url }}”
    dest: “/tmp/{{ apr_version }}.tar.gz”
    register: apr_source

  • debug:
    var: apr_source

  • name: Unpacking Apache APR
    unarchive:
    copy: no
    dest: /tmp/
    src: “{{ apr_source.dest }}”
    when: apr_source.changed
    register: apr_source_unpack

  • debug:
    var: apr_source_unpack

I am also registering some variables to check if the tarball has changed not sure how much use for you.