LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Deep Freeze for Linux. Reverting server to a previous state, kind of a “snapshot” being a physical machine (not a VM) (https://www.linuxquestions.org/questions/linux-server-73/deep-freeze-for-linux-reverting-server-to-a-previous-state-kind-of-a-%93snapshot%94-being-a-physical-machine-not-a-vm-4175695700/)

linuxdoesmatter 05-28-2021 03:02 AM

Deep Freeze for Linux. Reverting server to a previous state, kind of a “snapshot” being a physical machine (not a VM)
 
I work in an enviroment with a lot of Linux Servers and a few Windows servers. When we perfom some changes in the Windows ones it is very easy to go back to the original state using "Deep Freeze" software.

In the Linux servers if it is a VM we have the same result as before using Snapshots. It is very easy go back to the previous state of the server by going back with the snapshot.

Here is my problem... with physical machines we use parcial solutions for going back as rsync, yum history undo, yum histoty rollback <Trans.ID>, copy in the original folder the backups done previous to the patching, intallation, deployment activities, etc. Despite of that... We don´t have the 100% garantee of leaving the server exactly as it was before the change was made on it. Not with the same certainty as an snapshot or Deep Freeze.

With Windows Servers (Deep Freeze) or Linux VMs (Snapshot) we are complete calmed since we can always go back to the original position.

With phisical hosts/servers we are always very nervous. Servers are critical.

Is there any software Deep Freeze equivalent for Linux RHEL or any set of good practices to achieve the "go back" without beening scared when it comes to physical machines?

TO SUMMARIZE: Is there a way in Linux Physical Servers (RHEL) to go back to the exact point prior to any change something when this attempt of changing something ended up being a totally failure and we decide to go back to square one?

descendant_command 05-28-2021 03:46 AM

BTRFS snapshots would probably suit your use case.
Obviously requires a BTRFS filesystem though.

linuxdoesmatter 05-28-2021 04:31 AM

lvm and btrfs snapshot were taken in account but don´t solve our problem
 
Quote:

Originally Posted by descendant_command (Post 6254549)
BTRFS snapshots would probably suit your use case.
Obviously requires a BTRFS filesystem though.

We don´t have such FS... nevertheless we thought of lvm snapshots but they are "parcial" solution to our problem. Thanks anyway for your proposal.

syg00 05-28-2021 04:53 AM

RHEL7 Storage Admin Guide documented using snapper for similar. It was a limited implementation and different to the snapper as used on for example openSUSE. I couldn't find the same documented in the RHEL8 doco (note I am not a RHEL/CentOS user).
Both btrfs and LVM snapshot ensure file system consistency via filesystem freeze before the actual snap. Works for most sane environments, but not necessarily for databases. Personally I find the LVM implementation clunky, but even the btrfs needs some thought - what happens with /home ?. What about logs - do you want to investigate what went wrong, a rollback would wipe all those logs.
Then there is the small matter of getting grub to use a rolled-back environment on the next boot. All do-able, but needs planning.

Nothing is ever as simple as it first seems.


All times are GMT -5. The time now is 12:54 AM.