Skip to content

Create a Time-Machine-like backup of Keyboard Maestro macros

I use Keyboard Maestro a lot—a quick search here reveals how often I write about it, and I use it much more than I write about it.

I back up my macros reliably, as part of my overall backup plan. I also sync them between my Macs. And a while back, that caused an issue: Between the regular backups (Time Machine and removable external drive), I had a sync issue and I lost a few hours' worth of work on a new macro, and some untold number of old macros vanished. I recovered the older macros, but the new work was just gone.

So I set out to find a better backup solution for my macros.

I wanted a tool that created something close to versioned backups that were browsable in Finder, that didn't take a ton of drive space, and that made it super-simple to restore any single macro or macro group*Time Machine backs up the entire macros file, not individual macros or groups from some point in history.

I also wanted it to be completely risk-free to use, never modifying my macros in any way (so no import tool in the macro). I wanted Keyboard Maestro Time Machine, basically. As I couldn't find an existing solution that worked in that manner, I wrote my own.

Introducing MacroBackerUpper (MBU), the Time-Machine-like backup macro for your macros:

The above-linked post on the Keyboard Maestro forums contains an overview of MBU, and you can read the online help for a more-detailed look at the macro. But as seen above, the end result of using MBU is a set of timestamped folders in Finder.

Each folder contains a full backup of all my macros at that point in time. And like Time Machine, any macros that are identical to those in the prior backup have been replace by hard links, saving a ton of disk space (as most backups will consist primarily of unchanged macros).

Within each folder is a backup report, showing the exact changes between the latest backup and the second latest backup (click for the full report):

If you use Keyboard Maestro a lot, and rely on your macros, check out MacroBackerUpper as a way to ensure you never lose any of your work.

Download MacroBackerUpper 1.2

This is, by far, the most complicated, most tested (over 3,000 uses across the testers and myself), and probably most useful macro I've ever written. It's working incredibly well now, and I'm quite happy with how it turned out.

4 thoughts on “Create a Time-Machine-like backup of Keyboard Maestro macros”

    1. There's a note in the instructions about how to change its value (in the Usage Tips section). I do not recommend zero as a setting, as you'll then never be able to get to Settings.

      I don't think it's really worth having to set up and track a setting for that, at least not right now.I try to keep the use of globals down, and it's a bit of a pain working with the multi-element global I use to achieve that—it's already up to seven elements.

      Finder tags may become a setting; at one point in the macro's history, they were required as they were the only way to track that changes had been made, but when I switched to a database, that issue went away. It's on the to do list, but has a fair bit of code change behind it, so I haven't gotten to it yet.

      -rob.

      1. Thanks again. I've been removing Finder tags from the backups manually. Does the absence of tags interfere with deleting backups on the next backup if the max number of backups is reduced using Settings Manager? (I still have more than my max number, and I've run the backup several times since reducing it.)

Leave a Reply

Your email address will not be published. Required fields are marked *