# SQL Server DB Restore

**URL:** <https://forum.ansible.com/t/sql-server-db-restore/34666>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [February 22, 2021, 2:11pm UTC](https://forum.ansible.com/t/sql-server-db-restore/34666 "2021-02-22T14:11:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Praveen\_Kumar\_Singh](https://avatars.discourse-cdn.com/v4/letter/p/977dab/32.png) [@Praveen\_Kumar\_Singh](https://forum.ansible.com/u/Praveen_Kumar_Singh)\
**Post date:** [February 22, 2021, 2:11pm UTC](https://forum.ansible.com/t/sql-server-db-restore/34666/1 "2021-02-22T14:11:47Z")

</div>

Hello Everyone,

I am trying to create a playbook to perform the three below mentioned tasks. I am able to accomplish the first 2 tasks but for the third one which is to restore the Database I need to change the host server as windows server 2. So I am not sure how I can achieve it. The playbook I am using is below:

1. Taking backup on remote windows server 1.
2. Copying that backup to another remote windows server 2.
3. Restoring that backup to remote windows server 2.

---

<div class="post-metadata">

**Author:** ![Praveen\_Kumar\_Singh](https://avatars.discourse-cdn.com/v4/letter/p/977dab/32.png) [@Praveen\_Kumar\_Singh](https://forum.ansible.com/u/Praveen_Kumar_Singh)\
**Post date:** [February 23, 2021, 6:58am UTC](https://forum.ansible.com/t/sql-server-db-restore/34666/2 "2021-02-23T06:58:07Z")

</div>

can someone please help me on this

thanks and regards,  
Praveen Singh

---

<div class="post-metadata">

**Author:** ![Praveen\_Kumar\_Singh](https://avatars.discourse-cdn.com/v4/letter/p/977dab/32.png) [@Praveen\_Kumar\_Singh](https://forum.ansible.com/u/Praveen_Kumar_Singh)\
**Post date:** [February 24, 2021, 7:07am UTC](https://forum.ansible.com/t/sql-server-db-restore/34666/3 "2021-02-24T07:07:40Z")

</div>

Is there any solution for this to change the target server name in the middle of the playbook? This is for windows.

Thanks and Regards,  
Praveen Singh
