Is there anyway to backup the macro library completely and then restore a specific macro from that backup?

This morning I inadvertently deleted a macro.
I had done quite a few changes before I realised my mistake so backing up (CMD+Z) was not an option. Eventually I gave up and "rediscovered" that under the KM editor there is revert macros option to an earlier date, a feature I had forgotten about , so I just bit the bullet and went back to yesterday. This was brilliant and solved my immediate problem.

However, this led me to this question:

Is there anyway to backup the macro library completely and then restore a specific macro from that backup?

1 Like

You might find Rob's macrobackerupper will meet your needs:

1 Like

Hello Catlikesbest@jonathonl,

You can create a backup of your entire Macro Library in Keyboard Maestro and restore specific macros from that backup if needed.
Backup Macro Library.
Open Keyboard Maestro.
Go to the "File" menu.
Select "Export Macros" or "Backup Macros".
Choose a location to save the backup file (.kmmacros format).
This will create a backup of your entire Macro Library.

Restore Specific Macro
If you accidentally delete a macro or need to restore a specific one, open Keyboard Maestro.
Go to the "File" menu.
Select "Import Macros".
Choose the backup file (.kmmacros) that contains the macro you want to restore.
Keyboard Maestro will import all macros from the backup file.
After importing, you can find the specific macro you want to restore in your Macro Library.

By following these steps, you can create a backup of your Macro Library and easily restore specific macros when needed. This ensures that you have a safety net in case of accidental deletions or modifications.

Best regards,

The above is what my macro does, but it also creates a Time-Machine-like archive of prior backups, so you can go back in time to restore prior versions of any given macro. (Just like Time Machine, it uses hard links to do this, so the extra copies of non-changed macros take almost no disk space.)

-rob.

AFAIK your method imports ALL the macros whereas I only want 1 out of the 1000 I have. I stand to be corrected but I do not think you can specify a different "macro" library to the current operational one.

If you select File > Export all Macros as Folder (which is what I do in MacroBackerUpper), you'll have a folder containing every macro group as a folder, and then individual macros within those folders. You can then easily restore any of the individual macros.

-rob.

1 Like