Is there a "restore point" in Linux (Debian/Ubuntu) like Windows?

Solution 1:

There is no similar feature built into any Linux distribution that I know of. There are several reasons why it would be a lot less useful than for Windows.

  • Primarily, Linux distributions are a lot more serious than Microsoft about stable releases being upgraded only to fix important bugs and with minimum changes. For example, with Ubuntu and Debian, you can choose to receive only security updates (-security), or only security updates and important bug fixes (-updates).

  • Kernel upgrades are the riskiest ones, because of the chance that a seemingly beneficial change will cause trouble on a specific hardware configuration. This is why most distributions allow more than one kernel version to be installed at the same time; for example, at the time I'm writing this, Ubuntu 10.04 has three kernel versions available: 2.6.32.21.22 from the original release, 2.6.32.22.23 with security updates, and 2.6.32.23.24 with non-security updates as well. If the ...24 release causes a problem on your computer, you can reboot under ...23 (and even mark the ...24 as forbidden to install, at least if you're using aptitude).

  • There is no registry: all configuration data is in files (in the /etc hierarchy), which can easily be restored individually if something goes wrong. Even then, updates to the stable release rarely affect files under /etc.

  • If you're installing packages from some source other than a stable release, then you may want to keep copies of older versions of packages, and keep backups of your configuration files. Here are a few hints about this in Debian and Ubuntu.

    • Downloaded packages are kept in /var/cache/apt/archives. If you have the disk space, just don't delete old package files until you've confirmed the newer version works for you.
    • Many sources keep older versions, so you can downgrade easily (either by downloading and installing an older version manually, or by using apt preferences). For Debian, look at snapshot.debian.org.
    • There is a very easy way to set up version control over /etc: install the etckeeper package and activate it with the command etckeeper init. (I do it, but not because I'm worried about upgrades breaking something, rather because I'm worried about my changes breaking something.)

Solution 2:

It is not needed, since the package manager takes care of which file is from which package, and also is able to roll back the package update or installation.

Solution 3:

You could try using a tool like etckeeper. This tool simply keeps system-wide configuration files in a version control repository and makes it easy to rollback and apply again any change.

But, to be honest, I never needed to rollback any change that came from updates on my debian/stable systems. I use it to fix mistakes I did manually.

Solution 4:

TMK, the Windows restore feature only reverses changes to the registry and some critical directories. Linux does not have this.

You could try the manual approach with backups. Simply backup your home directory and the list of programs from Synaptic and use that as a restore point.

Solution 5:

Note that Ubuntu in particular (but probably also Debian) won't remove old kernel packages when installing the updates, and you can configure the bootloader to present a list of kernels to choose when booting.

This automatically creates "restore points" – for the kernel only – because you can choose the previous version if the newer causes problems. As far as I know, Windows has nothing like this for its kernel updates. (And especially for home users, I wouldn't want to fathom helping one diagnose and fix an unbootable system due to a kernel update.)