Sync conflict failure between iOS and Windows

iOS version: 17.6.1 (21G93)
Codebook iOS version: 5.02 (4220) - updated a few days ago
Windows version:
|Edition|Windows 11 Home|
|Version|23H2|
|Installed on|‎10/‎7/‎2022|
|OS build|22631.4037|
|Experience|Windows Feature Experience Pack 1000.22700.1027.0|
Codebook Windows version: 5.0.14.0 (018729e8) - updated today
Syncing to Google Drive

Accidentally deleted the wrong record on the Windows app. No worries! This has happened before. I added a field to the record in the iOS app, then synced across the two (windows first). Codebook deleted the record from the iOS device, rather than recognizing a conflict and creating a new record on Windows as expected.

Hi @pbabcock

Thanks for your support of Codebook and for posting to the discussion forum, although I’m sorry to hear about the trouble. I’ll be happy to help.

If you delete an entry from one device, it will be deleted from every device you sync to, no matter what edits are made on other devices.

When you mentioned conflicts, were you looking at the sync replication documentation: Codebook Help - Sync Replication ? That documentation includes information about updates and additions, but doesn’t explicitly mention deletes. I’m going to make a note to update that documentation to include a specific callout about how deletes operate (as mentioned in my comments above)

If you added a new field to the same entry on iOS, that field will be considered “Orphaned” because the Entry no longer exists. It should show up in the Recovered category if you run an Integrity Check.

Are you able to re-create the Entry data? If not, I could provide instructions for how to “rollback” Google Drive and attempt to recover the accidentally deleted entry.

I was able to recover from memory. As I think more on the issue, I had set the sync to overwrite in order to restore in the past. My bad.

In any case, having the instructions to roll back google would be helpful in case I make the same mistake again!

@pbabcock

Excellent. Glad to hear you were able to recover the Entry from memory.

No worries! Yes, if an accidental deletion occurred again, you would want to perform a one time Overwrite to Google Drive from the device that still has the data, and then a Merge from the device that doesn’t have the data. Merge merges all the data disregarding any previous deletes: Codebook Help - Sync Operations

Typically you’d need to rollback a file called codebook-metadata.db (what’s used for tracking what changes are present in the remote) to a time prior to the deletion occurring, then perform a Merge on both devices. Usually we’d recommend contacting our support to walk you through it. That being said, when first responding I forgot that we have changed Codebook’s Google Drive permissions back in March of this year: Codebook Google Drive Permission Change | Zetetic both as a requirement from Google related to their Google Drive API usage and to minimize Codebook’s access to the rest of your Google Drive files. Codebook’s synced data in Google Drive is now stored in a hidden AppData folder which contents aren’t viewable/editable except by Codebook itself.

If you use any backup software on Windows, you can mark this location to backup as well: %APPDATA%\Zetetic LLC which contains your local encrypted Codebook data. This way if an accidental deletion were to occur, you could recover it from the backup. Alternatively (or additionally) The Desktop applications offer Local Folder sync, so you could periodically sync your Codebook data to another location on your computer as an additional backup.

Feel free to reach out again if you have any further questions, issues, or feedback. Have a nice day!