# rsync data 1:1 between old/new servers w/roles

**URL:** <https://forum.ansible.com/t/rsync-data-1-1-between-old-new-servers-w-roles/22222>\
**Category:** Ansible Project\
**Created:** [August 5, 2016, 11:55am UTC](https://forum.ansible.com/t/rsync-data-1-1-between-old-new-servers-w-roles/22222 "2016-08-05T11:55:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gforster](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/gforster/32/535_2.png) [@gforster](https://forum.ansible.com/u/gforster)\
**Post date:** [August 5, 2016, 11:55am UTC](https://forum.ansible.com/t/rsync-data-1-1-between-old-new-servers-w-roles/22222/1 "2016-08-05T11:55:12Z")

</div>

I have a group of oldservers and matching new servers. I need to rsync a dir from each old one to each corresponding new one.

e.g.

oldserver1:/some/path → newserver1:/some/path  
oldserver2:/some/path → newserver2:/some/path  
oldserver3:/some/path → newserver3:/some/path

Even with the same path, the data therein can be different, so we don’t want oldserver1:/some/path → newserver3:/some/path

Up to this task, I already have the everything that needs to be prepped on the newserver in a functioning role.

I’m a bit lost at this point. I can manually do this via rsync no problem, but that’s what we’re trying to avoid, right?

---

<div class="post-metadata">

**Author:** ![gforster](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/gforster/32/535_2.png) [@gforster](https://forum.ansible.com/u/gforster)\
**Post date:** [August 5, 2016, 5:42pm UTC](https://forum.ansible.com/t/rsync-data-1-1-between-old-new-servers-w-roles/22222/2 "2016-08-05T17:42:22Z")

</div>

Let’s start with a simple example: How do I rysnc a dir in one group of servers to another group of servers? Let’s assume there is only one server in each group. i.e.

[oldservers]  
server1

[newservers]  
new-server1  
and i want a particular dir synced from [oldservers] to [newservers]
