# backup and restore of template  and workflow

**URL:** <https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210>\
**Category:** AWX Project\
**Tags:** awx, aws\
**Created:** [June 18, 2020, 12:06pm UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210 "2020-06-18T12:06:01Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![scsp](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@scsp](https://forum.ansible.com/u/scsp)\
**Post date:** [June 18, 2020, 12:06pm UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/1 "2020-06-18T12:06:01Z")

</div>

I am ble to take backup of AWS template and restore on same server for awx cli but when i tried to other awx cli its got failed .Can please any one suggest on this

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [June 19, 2020, 7:28am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/2 "2020-06-19T07:28:06Z")

</div>

I’d suggest you give us some clues as to what’s going wrong. Just posted it failed isn’t helpful!

---

<div class="post-metadata">

**Author:** ![Anish\_Kumar](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/anish_kumar/32/3534_2.png) [@Anish\_Kumar](https://forum.ansible.com/u/Anish_Kumar)\
**Post date:** [June 19, 2020, 7:35am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/3 "2020-06-19T07:35:26Z")

</div>

I have taken full backup from towercli and when I restore on the same Awz it’s works but when I restored on other server the template and work flow is not restored completely

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [June 19, 2020, 8:10am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/4 "2020-06-19T08:10:46Z")

</div>

What is missing

---

<div class="post-metadata">

**Author:** ![scsp](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@scsp](https://forum.ansible.com/u/scsp)\
**Post date:** [June 19, 2020, 8:16am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/5 "2020-06-19T08:16:35Z")

</div>

Password is not coming and tempalte is not working

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [June 19, 2020, 8:18am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/6 "2020-06-19T08:18:23Z")

</div>

If you’re talking about credentials that’s normal as well as in job template. You can use tower\_modules to keep your tower configuration as code to restore

---

<div class="post-metadata">

**Author:** ![scsp](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@scsp](https://forum.ansible.com/u/scsp)\
**Post date:** [June 21, 2020, 6:30am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/7 "2020-06-21T06:30:27Z")

</div>

Hello Wein ,

From Tower cli to get the template file and job in full backup and when i restored but i am not getting password .  
As per our last discussion you told to check with tower module but i didnt find any thing there can you please help me on this

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [June 21, 2020, 6:36am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/8 "2020-06-21T06:36:55Z")

</div>

I used all the tower modules and created a playbook to create my awx infrastructure. I use vars for each resource and thus loos through my items for each task.

I have been through this exercise. Works a treat. I just redefine what my vars are and the playbook makes the necessary changes

---

<div class="post-metadata">

**Author:** ![scsp](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@scsp](https://forum.ansible.com/u/scsp)\
**Post date:** [June 21, 2020, 6:38am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/9 "2020-06-21T06:38:44Z")

</div>

do you have any link for this tower module

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [June 21, 2020, 6:39am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/10 "2020-06-21T06:39:06Z")

</div>

Mind you. You can’t export from the cli the credential and expect it to export the entire credential. I spent the time to create the vars.yml with my details in it and then vaulted it.

---

<div class="post-metadata">

**Author:** ![scsp](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@scsp](https://forum.ansible.com/u/scsp)\
**Post date:** [June 21, 2020, 6:40am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/11 "2020-06-21T06:40:29Z")

</div>

can you please dont mind if you share tower module link or vars.yaml

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [June 21, 2020, 6:42am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/12 "2020-06-21T06:42:19Z")

</div>

Can’t really show you the vars because they hold my credential info. But to start with try having a look at

[https://docs.ansible.com/ansible/latest/modules/tower\_credential\_module.html](https://docs.ansible.com/ansible/latest/modules/tower_credential_module.html)

And thing starting with tower in that page is what you are looking for

---

<div class="post-metadata">

**Author:** ![scsp](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@scsp](https://forum.ansible.com/u/scsp)\
**Post date:** [June 21, 2020, 6:48am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/13 "2020-06-21T06:48:06Z")

</div>

thanks mate is tower cli and tower module is same

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [June 21, 2020, 6:49am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/14 "2020-06-21T06:49:21Z")

</div>

Kind of. Tower modules use tower-cli to get the work done

---

<div class="post-metadata">

**Author:** ![scsp](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@scsp](https://forum.ansible.com/u/scsp)\
**Post date:** [June 21, 2020, 6:50am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/15 "2020-06-21T06:50:45Z")

</div>

Yes thanks… Also still not clear about how to get back up of credential

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [June 21, 2020, 6:55am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/16 "2020-06-21T06:55:03Z")

</div>

You cannot export the full credentials. With use name and passwords. What you do is create a playbook to generate those configuration for you.

Write a simple playbook creating a single credential resource defining username and password. That’s essentially what I am doing.

---

<div class="post-metadata">

**Author:** ![scsp](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@scsp](https://forum.ansible.com/u/scsp)\
**Post date:** [June 21, 2020, 6:56am UTC](https://forum.ansible.com/t/backup-and-restore-of-template-and-workflow/33210/17 "2020-06-21T06:56:25Z")

</div>

Can u please share me sample of that playbook
