I run a headless home server and sometimes need to make configuration changes that have the potential to break remote access. Is there a tool or system service that can be set to define what constitutes a "good" state (e.g. can ping 1.1.1.1 and some remote host can see me) and have it roll back changes automatically if it detects a "bad" state? I saw one answer that provides a very targeted suggestion, but I'm looking for something more general that I can leave running all the time.
In a perfect world, it would look like it literally rolled back time. But I don't want to run a VM, so I'll settle for detecting and automatically restoring files I manually edit under /etc
. It would even be valuable to have a service automatically roll back all changes to /etc
and reboot the system unless I specifically indicate the new state is good within five minutes of the change being made.
Is there any package or service that does this?