# How to Sync F5 configuration using Python SDK

**URL:** <https://community.f5.com/t/how-to-sync-f5-configuration-using-python-sdk/47870>\
**Category:** Technical Forums\
**Tags:** big-ip, f5-python-sdk, devops, ltm, application-delivery, config-sync\
**Created:** [July 29, 2018, 5:09pm UTC](https://community.f5.com/t/how-to-sync-f5-configuration-using-python-sdk/47870 "2018-07-29T17:09:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SaranSakthivel](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@SaranSakthivel](https://community.f5.com/u/SaranSakthivel)\
**Post date:** [July 29, 2018, 5:09pm UTC](https://community.f5.com/t/how-to-sync-f5-configuration-using-python-sdk/47870/1 "2018-07-29T17:09:48Z")

</div>

I tried the following to sync the config.

```tcl
mgmt.tm.sys.configsync.synchronize_to_group_v2('SYNC-FAILOVER','/Common/test-host.com')

```

The idea is to ‘sync’ and also optionally to do a ‘force sync’

---

<div class="post-metadata">

**Author:** ![SaranSakthivel](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@SaranSakthivel](https://community.f5.com/u/SaranSakthivel)\
**Post date:** [July 31, 2018, 8:32am UTC](https://community.f5.com/t/how-to-sync-f5-configuration-using-python-sdk/47870/2 "2018-07-31T08:32:36Z")

</div>

I was able to initiate config sync using bigsuds, anyone knwos hows to initiate config sync using f5 python SDK ?

```tcl
b.System.ConfigSync.synchronize_to_group_v2('SYNC-FAILOVER','/Common/', 'true')

```

---

<div class="post-metadata">

**Author:** ![SaranSakthivel](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@SaranSakthivel](https://community.f5.com/u/SaranSakthivel)\
**Post date:** [July 31, 2018, 1:48pm UTC](https://community.f5.com/t/how-to-sync-f5-configuration-using-python-sdk/47870/3 "2018-07-31T13:48:28Z")

</div>

After some more more reading of f5 python sdk docs, I was able to get it working. Kindly let me know if there is a better way of doing it.

For Force Push

```tcl
mgmt.tm.cm.exec_cmd('run', utilCmdArgs='config-sync force-full-load-push to-group ')

```

For Push

```tcl
mgmt.tm.cm.exec_cmd('run', utilCmdArgs='config-sync to-group ')

```

---

<div class="post-metadata">

**Author:** ![SaranSakthivel](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@SaranSakthivel](https://community.f5.com/u/SaranSakthivel)\
**Post date:** [July 31, 2018, 1:51pm UTC](https://community.f5.com/t/how-to-sync-f5-configuration-using-python-sdk/47870/4 "2018-07-31T13:51:25Z")

</div>

Is there a way to get a feedback of whether the Sync was successful or not in one go ?

Currently I have to run the above command and run another command to check for sync status.
