18

Windows has this. Basically what I want is to record the state of the system either manually or periodically and then restore to that point if required. For example, before upgrading the distribution, or before installing a certain package.

What would be the easiest way to do this?

Slavo
  • 407

4 Answers4

11

You can try Back in Time:

sudo add-apt-repository ppa:bit-team/stable
sudo apt-get update
sudo apt-get install backintime-qt4

Note: GNOME/KDE UI has been deprecated, hence -qt4 now. See here.

edwinksl
  • 23,789
sergio91pt
  • 2,942
9

There are different backup-utilities available, but the functionality of the "Windows Restore System" does not exist in that form (at least not that I know of) (since it's not really necessary see Footnote).

If you have a small system partition you can easily create an image of it using dd, saving it to disk and if necessary restore it.

dd if=/dev/sdXX of=/media/backup/system.img bs=1M

Footnote: I don't see the need for such functionality because there's no way to wreck the system by installing something as long as you stick to apt. Updated kernels might not boot or work correct, that's why the old ones are remaining (and can still be booted) until they're removed by hand. Of course you can still screw everything, but that's a lot harder to do.

Bobby
  • 784
  • Hi! Let's say I screw my system, how can I use this back up img to restore it? – Giorgio Vitanza Jul 21 '17 at 19:20
  • 1
    @GiorgioVitanza exactly the other way round: dd if=/media/backup/system.img of=/dev/sdXX bs=1M – Bobby Jul 21 '17 at 19:37
  • 4
    "because there's no way to wreck the system by installing something as long as you stick to apt" Thats not true. I was able to wreck my system installing the latest nvidia drivers using apt-get forcing me to reinstall Ubuntu 16.04 – Gabriel Fair Feb 25 '18 at 20:43
  • 1
    Completely on same page as @GabrielFair, in fact NVIDIA drivers breaking is the n1 reason I need those restore points: https://askubuntu.com/questions/1323872/ubuntu-20-4-update-broke-my-nvidia-460-driver-config – Max Mar 17 '21 at 07:08
4

Time Shiftcan also do the same.

sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install timeshift

enter image description here

Raja G
  • 102,391
  • 106
  • 255
  • 328
3

You can also use a storage volume management system (e.g. LVM) or a filesystem (e.g. btrfs) that supports snapshots for this.

And most virtualisation software also supports this in their "disk files" (e.g. the qcow/qcow2 format used in qemu).

JanC
  • 19,422
  • This feels like a foreign language for me. I suppose I would need to reformat the partition to use a different file system? Not very used friendly. – Slavo Nov 03 '10 at 17:19
  • This is currently not very user-friendly indeed (read: there is no GUI tool), but maybe that will change in the future... who knows. – JanC Nov 03 '10 at 18:12