Sync iphone with 2 laptops doesn’t work

I am syncing between my laptop and my iphone via wifi and it reports that it succeeds. However, I see that local changes on each device have not been copied to the other device. So the sync failed in both directions.

I can’t solve this by overwriting in one direction, because there are changes on both devices. I do not see a way of dealing with this without exporting in open text, doing a diff, manually fixing one device, and then overwriting the other device. That would be a pain.

I assume that this problem happens because I typically use my iphone as a go-between for 2 laptops. I typically add passwords and access passwords on all 3 devices.

Any advice ?

1 Like

I don’t have an answer for you, but I’d be happy to learn what Zetetic advised for this scenario. All I can add is that I’ve been wary of this problem myself, because Zetetic doesn’t advertise syncing between multiple change lines. System clock synchronization is sure to be an essential factor when syncing more than two change lines… To keep it simple, I sync/merge changes between one phone and one desktop, Every other instance of my password database (default.strip) is updated by an overwrite from one of these two master sources.

Hi @Ben_Kilminster

Thank you for your support of Codebook and sorry for the delay in response here on the discussion boards.

I can’t solve this by overwriting in one direction, because there are changes on both devices. I do not see a way of dealing with this without exporting in open text, doing a diff, manually fixing one device, and then overwriting the other device. That would be a pain.

Unfortunately, if you have changes on both sides and an overwrite isn’t a possibility as you mentioned, then the second option is currently the only way to “true” up your databases.

I assume that this problem happens because I typically use my iphone as a go-between for 2 laptops. I typically add passwords and access passwords on all 3 devices.

We had identified an issue a while back which could have caused your csn numbers (what’s used to track changes to your Codeobok database on each side) to be not lined up properly. The issue has since been rectified.

The basic steps for re-establishing a Codebook database which includes all the changes manually added from the diff would be:

(I’m assuming you’re using WiFi sync from your Description)

  1. Export [1] your current Codebook database from Laptop 1 to a txt file.
  2. Perform an Overwrite operation from iPhone 1 to Laptop 1.
  3. Export the overwritten database on Laptop 1 to a txt file.
  4. Perform a diff [2] between the txt file exported in step 1 and the txt file exported in step 3. Then add/edit any records that have been adjusted/added
  5. Export the (now modified/merged) database from Laptop 1 (with the combined data from Laptop 1 and iPhone 1 manually added in) to a txt file (Master-Laptop1_iPhone1.txt).
  6. Quit Codeobok and move the current database from Laptop 1 out of the way – In Finder, Go > Go To Folder and paste this location in the address bar: ~/Library/Containers/net.zetetic.Strip.mac/Data/Library/Application Support/Strip within that locatation there should be a default.strip package and a Backups folder. Move them onto the Desktop for now.
  7. Launch Codebook, set it up with the same master password as you were using.
  8. Perform an Restore onto iPhone 1 from Laptop 2.
  9. Perform an Overwrite from iPhone to Laptop 1 (Laptop 1 will now contain the data from `Laptop 2).
  10. Export the database from Laptop 1 to a txt file.
  11. Quit Codebook and move the default.strip package and Backups folder we moved onto the Desktop in step 6 back into this location: ~/Library/Containers/net.zetetic.Strip.mac/Data/Library/Application Support/Strip.
  12. Perform a diff between the txt file exported in step 5 (Master-Laptop1_iPhone1.txt) and the txt file we exported in step 10 (Laptop 1 which actually contained the data from Laptop 2).
  13. Add/Modify anything that was different/newly added from Laptop 2.
  14. Now Laptop 1 should have your master copy with all your changes. Perform a Restore on iPhone 1 from Laptop 1 (to transfer the data from Laptop 1 to iPhone 1). Perform an Overwrite from iPhone 1 to Laptop 2 (to transfer the data from iPhone 1 to Laptop 2). Now all 3 device should be completely updated and be back in a good spot as far as their csns lining up.

Again, we’re very sorry for this trouble, and understand it’s definitely a pain to go through this process.

Please let me know if these steps are clear and if you have any questions. We’d be happy to assist further via private support here: support@zetetic.net

[1] Codebook Help - Export
[2] How to Use diff to Compare Two Files at Mac Command Line

mmore,

Thanks for the detailed description for rectifying three inconsistent databases.

What wasn’t clear is whether, going forward, we can freely sync between multiple databases or must we still pursue a hierarchical overwrite scheme to update multiple repositories from a master database.

Thanks for your support. I await your reply.

@JFS

What wasn’t clear is whether, going forward, we can freely sync between multiple databases or must we still pursue a hierarchical overwrite scheme to update multiple repositories from a master database.

Yes, going forwards you should be fine freely syncing between multiple databases. That being said, when managing multiple Codebook devices, we typically recommend treating one as the “master” and make the majority of your additions/edits on that database. This will usually mean that you need to sync fewer times if you’re using WiFi sync with 3+ devices.