大网数据广告活动
服务器运维问答

Is it possible to copy data from one Ansible Tower to another?

· 52CE 我爱测

I am attempting to copy all the data (templates, credentials, inventories, etc) from my Ansible Tower production instance to my newly created dev instance. Is there a way to do this automatically using an ansible API? I have atte…

问题原文

原帖链接 · user597296 · CC BY-SA 4.0

I am attempting to copy all the data (templates, credentials, inventories, etc) from my Ansible Tower production instance to my newly created dev instance. Is there a way to do this automatically using an ansible API? I have attempted to research tower-cli but there doesn't seem to be much information on this use case. Additionally, tower-cli looks to be deprecated.

已采纳解答

原帖链接 · TRW · CC BY-SA 4.0

Yes and no - you can use tower-cli to receive (backup) and send (restore) the configuration. See https://www.unixarena.com/2019/03/backup-restore-ansible-awx-tower-cli.html/

tower-cli receive --all >  config.json
tower-cli send config.json

But - there is no way to backup the credentials. The receive command doesnt export them.

All possible options are documented https://tower-cli.readthedocs.io/en/latest/ but not very good. I found the command line help within tower-cli help a bit easier to understand.

Also - development is no longer under development. So, be aware that the new client is awxkit. See https://github.com/ansible/awx/tree/devel/awxkit/awxkit/cli/docs - it has the same parameters.

I've got also the answer: make a backup of the AWX database and recover them to the new database (or reuse it) together with the new AWX instance. But I'm not sure, if this is really a 'good' recommended solution.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-10-19)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。