Backing up KM Application Support files

Here’s is an Applescript that backs up your Keyboard Maestro folder of files in your
Users/YourUserName/Library/Application Support/Keyboard Maestro.

There are a few more critical Application Support files that should be backed up.

As an alternative approach you may find the below helpful noting it has the advantage of being able to restore anything between an individual macros to all macros should you wish.

Screenshot

Keyboard_Backup All Macros.kmmacros (38.8 KB)

Three points worth noting:

  1. If you do lock your computer then you will need to add your password to the Keychain as this is the most secure way I can think of unlocking a computer so the GUI action can execute. You will need to replace "Daily MacBook" with whatever you name the Keychain entry for your MacBook.

  2. If you do lock your computer then note:
    a) The macro does unlock your computer for a few seconds (the macro is very fast); and
    b) The macro does lock your computer on completion.

  3. The macro is self pruning. It keeps backups for Local_RetentionDays and then deletes them. The deletion occurs when the macro runs.

I hope it helps.

1 Like

Thanks, that’s very comprehensive. I would definitely have had something like this at work. I didn’t know one could inject comments into the macro. Tx. Learn something new everyday

An even more robust version ...but you need Moom!

Keyboard_Backup All Macros.kmmacros (39.8 KB)

This version uses Moom to save and restore the window layouts exactly as they were before the macro runs and then...cleans up after itself by deleting the saved layout!

Thank you @griffman!

1 Like

Thanks, much appreciated!