# Debugging Sync Conflicts

**URL:** <https://forums.ankiweb.net/t/debugging-sync-conflicts/25714>\
**Category:** Help\
**Created:** [December 27, 2022, 10:58am UTC](https://forums.ankiweb.net/t/debugging-sync-conflicts/25714 "2022-12-27T10:58:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![CrushableIgloo](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@CrushableIgloo](https://forums.ankiweb.net/u/CrushableIgloo)\
**Post date:** [December 27, 2022, 10:58am UTC](https://forums.ankiweb.net/t/debugging-sync-conflicts/25714/1 "2022-12-27T10:58:09Z")

</div>

I am encountering a sync conflict between AnkiMobile and AnkiWeb and am looking for more info.

- I have not used Anki in a while, but cannot think of a reason why it would be out of sync. (In fact, I am assuming there can only be a very minor conflict, but I would strongly prefer not having to risk it.)
- I went and checked AnkiWeb to make sure that I had not run into [automatic account removal](https://faqs.ankiweb.net/ankiweb-account-removal.html), but my account looks alive and is filled with the same content as expected.
- I have restarted the iOS device as suggested in another thread here, but to no avail.

That means I now need to decide how the conflict should be resolved, but Anki is not presenting me the basis for that decision. Manuals for AnkiMobile as well as Anki on Desktop were pretty silent on this.

How do I find out what is causing the conflict?

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [December 28, 2022, 3:28am UTC](https://forums.ankiweb.net/t/debugging-sync-conflicts/25714/2 "2022-12-28T03:28:59Z")

</div>

Certain actions like changing a notetype, restoring from a backup, or when an inconsistency is discovered will force a one-way sync. After that, Anki just knows that it must sync in one direction, and not why. There’s no easy way to compare the two sides I’m afraid, though you could do so manually by downloading the collection into a new profile, and then checking review counts/card numbers and comparing.

---

<div class="post-metadata">

**Author:** ![CrushableIgloo](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@CrushableIgloo](https://forums.ankiweb.net/u/CrushableIgloo)\
**Post date:** [December 28, 2022, 10:27am UTC](https://forums.ankiweb.net/t/debugging-sync-conflicts/25714/3 "2022-12-28T10:27:34Z")

</div>

> [@dae](#):
>
> Anki just knows that it must sync in one direction, and not why.

I just know that it must sync in one direction, and not which 😉

> [@dae](#):
>
> There’s no easy way to compare the two sides I’m afraid, though you could do so manually by downloading the collection into a new profile, and then checking review counts/card numbers and comparing.

Could I create a new profile locally, sync it with AnkiWeb, export collections from both and then compare the contained sqlites against each other – or would they already differ substantially because of the newly created profile?

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [December 30, 2022, 6:09am UTC](https://forums.ankiweb.net/t/debugging-sync-conflicts/25714/4 "2022-12-30T06:09:26Z")

</div>

Yes, you could do that if you know how - the download is a verbatim copy, so there shouldn’t be spurious differences.

---

<div class="post-metadata">

**Author:** ![CrushableIgloo](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@CrushableIgloo](https://forums.ankiweb.net/u/CrushableIgloo)\
**Post date:** [December 31, 2022, 7:14am UTC](https://forums.ankiweb.net/t/debugging-sync-conflicts/25714/5 "2022-12-31T07:14:20Z")

</div>

Thank you. For the sake of completeness, below are all changes I have found (except for changes in sqlite system tables sqlite\_stat1 and sqlite\_stat4). They are in the **col** table and to be read as _from local to remote_:

1. **mod** changed from `1672137280860` to `1672463451614`

2. **scm** changed from `1627565511941` to `1638007319608`

3. **usn** changed from `192` to `193`

4. **ls** changed from `1667192637863` to `1672463451614`

5. **conf**  
5.1. had **lastUnburied** change from `2235` to `2238`  
5.2. included the following on local that was **missing** from _remote_:  
`"backups":{"daily":12,"minimum_interval_mins":30,"monthly":9,"weekly":10},`  
`"ignoreAccentsInSearch":false`

6. **models** was identical

7. **decks**  
7.1. had **one deck** change **mod** from `1667192641` to `1572685507` and **usn** from `-1` to `0`  
7.2. had **all decks except “Custom Study Session”** include the following on remote that was **missing** from _local_:  
`"newLimit":null,`  
`"reviewLimit":null,`  
`"newLimitToday":null,`  
`"reviewLimitToday":null`

8. **dconf** was identical

9. **tags** had all identical keys, but all values changed from `-1` to `0`

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [January 1, 2023, 10:27pm UTC](https://forums.ankiweb.net/t/debugging-sync-conflicts/25714/6 "2023-01-01T22:27:38Z")

</div>

I don’t see any obvious schema differences from your description, so it’s not clear what triggered the conflict if you don’t recall importing a backup or using ‘check database’.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [January 31, 2023, 10:28pm UTC](https://forums.ankiweb.net/t/debugging-sync-conflicts/25714/7 "2023-01-31T22:28:32Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
