# Correct command/options: pt-table-sync

**URL:** <https://forums.percona.com/t/correct-command-options-pt-table-sync/12814>\
**Category:** General Questions\
**Tags:** percona\
**Created:** [October 31, 2021, 8:21pm UTC](https://forums.percona.com/t/correct-command-options-pt-table-sync/12814 "2021-10-31T20:21:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cameron\_Bolourchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cameron_bolourchi/32/4892_2.png) [@Cameron\_Bolourchi](https://forums.percona.com/u/Cameron_Bolourchi)\
**Post date:** [October 31, 2021, 8:21pm UTC](https://forums.percona.com/t/correct-command-options-pt-table-sync/12814/1 "2021-10-31T20:21:24Z")

</div>

Hello,

I’m trying to fix a slave (localhost) that is out of sync with my master (by updating the slave to match what’s on the master). I’ve tried this command below but I only get a response saying “Can’t make changes on host information because it’s a slave”. Is this what I should be using or is it something else?

pt-table-sync --print h=masterhost,D=db,u=user,p=password,t=table h=localhost

Thanks.

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [November 1, 2021, 11:58am UTC](https://forums.percona.com/t/correct-command-options-pt-table-sync/12814/2 "2021-11-01T11:58:49Z")

</div>

Hi Cameron, try the following to generate the statements you need:

`pt-table-sync --print --sync-to-master -u user -p pass localhost`

The statements generated are meant to **always** makes the changes on the replication master, **never** the replication slave directly. Please see the [manual](https://www.percona.com/doc/percona-toolkit/LATEST/pt-table-sync.html) for more info.
