Is there a way to restore a single faulty RM rule?

After copying some lines, my RM rule was unusable. I tried to restore this app by a downloaded version of this rule (restore button within the rule). But I get: is installed, cannot be restored.

Is there a way to substitute the defect rule without losing the links to the devices, hub variables etc.? And without losing the links to other rules (e.g. cancel timed actions)?

So I did a full recovery, but a single rule recovery would be faster.

Under export/clone you can export all your rules. So doing a rule backup every so often would be your only choice, that I know of.

I have found, and I always don't remember to do it, is to clone a rule before doing any modifications. Especially on large rules.

Once a rule gets hosed there is nothing I have found to do but rebuild it. or do a full restore from a previous backup.

1 Like

@kunpet I mean unless you've done a lot of changes within one day, you can just restore everything from backup. The only thing that will change is the restored rule (again provided you didn't change anything else). As @terminal3 said though, best to either clone or export a rule before working on it.

1 Like

Thank you, it is as I already feared.
My problem is, that indeed the RM rules rarely break, but then unexpected as a result of a 'unsuspicious' operation. When I develop or debug a set of several rules, it needs much discipline to do frequent backups and to remember the later changes.
But I have to accept the capabilities of the system (and in sum they are satisfying).

Are you able to simply restore from a previous backup? It's automatically backed up at around 2:am every day

1 Like

Sure. This is not a problem.
But at the moment I develop and debug a set of about 10 of my rules, with 30-80 lines per rule. I change and add commands simultaneously within the test process. So many distributed changes to the nightly backup come together.

Make a backup first, restore from a previous backup, export the rule, restore from today's backup, import the rule. It's a pain, but it works! Truth be told I usually find it easier to just rewrite the rule.


Laborious, but a safe way to recover a large broken rule! A bug-free rewrite of 80 action lines (with many conditions) and of some trigger lines also takes considerably long time.


Download the Hubitat app