How to recover macros lost due to sync issues (i.e. iCloud)

I stumbled upon this problem several times and tried to troubleshoot it here. I was just also going through Bug: Losing Changes in Macros

Somewhat by accident, I discovered a way to recover the macros. This works for iCloud, not sure about other service providers.

  1. Navigate to your iCloud .kmsync file location
  2. Double click it. This should open a pop up window notifying you about a sync conflict, prompting you for a resolution
  3. Tick checkboxes for the last few snapshots (in my case, I narrowed it to 2, several hours apart).
  4. Save these files
  5. Go to Keyboard Maestro's General Preferences, uncheck and check again Sync Macros
  6. Load the file of choice (if you're not sure which one, make an educated guess based on the edit time and file size – you can always repeat steps 5–6 with another file)

In my case, I was fortunate enough to recover a dozen of my macros that I've created yesterday.

Just to let you know, for some reason double clicking any of the recovered .kmsync files directly won't load them to Keyboard Maestro, it has to be done via the Sync Macros checkbox route.

Option 2: Don’t use iCloud... :sweat_smile: Nah but all jokes aside, thanks for this info. I know a number of users do use iCloud for library syncing, so no doubt they’ll benefit from this.

Yeah I've actually just moved my kmsync file to the Shared folder (as I need it for two local macOS user profiles, so it's good for me) and I'm coding a backup iCloud sync with Automator that monitors the changes in the Shared/KM folder