4

Many times, I feel need to restore my linux system to some previous safe state. Few utility based option such as 'apt-get remove (for Ubuntu)' etc are available but are limited to cleaning unwanted software installations only.

The need ofcourse is not emerged after looking at windows way of recovery, but Its always a good and intuitive option to have system recovery feature inbuilt into the system especially for frequent configuration and development work.

May be I'm unaware but do any linux flavor has such feature inbuilt?

5
  • askubuntu.com/questions/9135/… ??? Feb 17, 2014 at 13:15
  • "I feel need to restore my linux system to some previous safe state." Why?! Suppress that need! :=) We in Linux land are used to making backups.
    – Rinzwind
    Feb 17, 2014 at 13:46
  • @Bruno Pereir-The answer given by Huckle is impressive. But I've same concern again that why can't linux bundle whole this bunch of commands into a dedicated recovery tool. Make that tool generic and allow all the linux flavor to implement it as per their need and specific requirement.
    – Winn
    Feb 17, 2014 at 13:47
  • @Winn there are graphical backup tools, thats all you need. You do not need a rigid "restore my system to x in time" when simple backup tools already do that. What you need to actually do is have a look at the file system structure of a linux installation, once you realized that all you need to do is backup a few folders and nothing else you will loose the need to have such rigid tools, maybe that is the reason there was never much interest to develop such thing for Linux :) Feb 17, 2014 at 13:52
  • @Bruno Pereir Well, but sometimes I may forget to take a backup. So in that case will the backup utility provide any auto-backup options similar to the one windows sets auto breakpoints sometimes before installing some heavy software.
    – Winn
    Feb 17, 2014 at 14:14

1 Answer 1

4

Linux is probably one of the most hardware agnostic operative system out there, it will simply run, no matter where, with little issues.

To run that same desktop environment that you (probably used) to post this question on another computer you would need to backup the files composing your system, restore them to another computer and program the boot loader used to be able to use it.

This is not Windows (or similar) where a simple mess up with your graphics driver or another device driver will send you to a complete re-install.

A restore point in time is a simple backup of the files on your system, nothing else, make backups to a safe source and if something goes wrong the restore process will be a simple file copy from one point to the other, and nothing else. If you use a backup tool that calculates the diff between backups your "points-in-time" will be as small as the differences between backup points, or just use a file-system with snapshot abilities to create on-the-fly automatic file system snapshots (ZFS, BTRFS and some others do that already and are supported in Linux).

Something else that is really easy to implement is a backup on apt-get, just add a run hook in /etc/apt/apt.conf.d/99bup containing:

DPkg::Post-Invoke {"/bin/bash /foo_script"; };

where foo_script creates a backup of all your (selected) files to a safe place after installing packages (restore those files to a previsous version if the packages you installed are not wanted). May I recommend something like this?

Each one of us, as users and administrators, have their favourite way of doing this. If you are finding yourself overwhelm with options, the backup tool built-in Ubuntu's release will do just fine until you figure out what you actually need.

(On the risk of answering this with a question)
Why do you need more than a backup tool if your system is that easy to understand?

6
  • Well, Nice explaination. But sometimes I may forget to take a backup. So in that case will the backup utility provide any auto-backup options similar to the one windows sets auto breakpoints before installing some heavy software so even if we forget to set it manually, we'll have no concern. (Sorry, I referred windows here :), but the feature of auto breakpointing is impressive I guess).
    – Winn
    Feb 17, 2014 at 14:23
  • But of-course, I am assuming on the "create a restore point because I am installing winrar and that might break my system" feature in windows correct? I will add an edit to the answer. Feb 17, 2014 at 14:32
  • 1
    "But sometimes I may forget to take a backup." cron never forgets to make a backup for you ;)
    – Rinzwind
    Feb 17, 2014 at 14:35
  • @Rinzwind :) but I think the OP is looking for something less "scheduled" and more like a restore point for each action (like Windows does when you install anything, or press a button, or boot, or remove stuffs, or even think about your computer when on vacation while having mojitos, or think about apple pie... restore points! Restore points everywhere!) Feb 17, 2014 at 14:41
  • @BrunoPereira Haha :) These are the expected counter words from any linux professional whenever some novice linux user starts comparing between linux & windows. And I think its an obvious behavior for both of them. But Its true that, we should take windows and linux as two separate entities without concerning why this is there and why this is not. Well, thanks a lot for such a nice explanation. Indeed helpful.
    – Winn
    Feb 17, 2014 at 14:48

Not the answer you're looking for? Browse other questions tagged .