0

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?

2 Answers 2

0

Timeshift can be used to achieve your goal. In a headless Debian server, Timeshift provide a CLI tool.

Install:

sudo apt install timeshift

Basic cli options from manpages:

List:
  --list[-snapshots]         List snapshots

Backup:
   --create                   Create snapshot (even if not scheduled)

Restore:
  --restore                  Restore snapshot
  --clone                    Clone current system

Delete:
  --delete                   Delete snapshot

Examples:
timeshift --create --comments "after update" --tags D
timeshift --restore --snapshot '2014-10-12_16-29-08' --target /dev/sda1
timeshift --delete  --snapshot '2014-10-12_16-29-08'
0

You describe various concepts:

Revision control

This is a tool that lets you role back source-code or configurations.

Automatic deployment

Have configurations that are added to revision control automatically deployed.

Automated test

Code or configurations are tested before or after deployment. If done before, then a pass can trigger deployment. If done after, then a fail can trigger rollback.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.