15

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?

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.

  • 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
  • 1
    "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
10

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.

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

  • fyi: time shift is only for backing up system files – Gabriel Fair Feb 25 '18 at 20:57
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).

  • 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 3 '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 3 '10 at 18:12

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.