# copy from remote a to remote b

**URL:** <https://forum.ansible.com/t/copy-from-remote-a-to-remote-b/23475>\
**Category:** Ansible Project\
**Created:** [January 17, 2017, 10:44am UTC](https://forum.ansible.com/t/copy-from-remote-a-to-remote-b/23475 "2017-01-17T10:44:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cev\_Ing](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@Cev\_Ing](https://forum.ansible.com/u/Cev_Ing)\
**Post date:** [January 17, 2017, 10:44am UTC](https://forum.ansible.com/t/copy-from-remote-a-to-remote-b/23475/1 "2017-01-17T10:44:03Z")

</div>

I need to copy the very big file X from remote system A to remote system B, only if X is newer on A or if X is missing on B.

I can do it in two steps: first transfer X from A to the Ansible server and next from the Ansible server to B.

But the effect will be that all files from A are mirrored on the Ansible server. I do not have enough space on the Ansible server. And I would like to avoid unnecessary transfers.

Is it possible to compare X on A and B without mirroring X on the Ansible server?

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [January 17, 2017, 1:09pm UTC](https://forum.ansible.com/t/copy-from-remote-a-to-remote-b/23475/2 "2017-01-17T13:09:42Z")

</div>

You might be able to do what you want using the synchronize module by taking advantage of ansible’s ability to delegate modules to run on specific hosts.

Lots of examples of ways to use synchronize on the module documentation page here: [http://docs.ansible.com/ansible/synchronize\_module.html](http://docs.ansible.com/ansible/synchronize_module.html)

Hope this helps,

Jon
