Linux – How to create and use Restore Points in Arch Linux (or Linux in general)

arch linuxbackuprestore

I am relatively new to Arch Linux and I really like its rolling-release concept. Now what I want to know is that before I do a system update via pacman -Syu, I want to create a restore point so that should my system update fail, I can go back to the last good state my computer was in before the attempted system update.

This is because once when I did a pacman -Syu on my Arch install, it b0rked my system and wouldn't boot. It happened when I still had minimal to no essential files on my computer so I did a fresh install. But now that I sort of slowly built a system much to my liking, I don't want to reinstall it from scratch and do all the things I have already done again should a system update break it. With a restore point, I can most likely restore my computer without the hassle of reinstalling everything.

So, how so I create, and use, restore points in Arch linux?

Best Answer

Arch isn't designed to work like that: it is a rolling release, so you are always going to have to continue to upgrade packages as they are pushed to your repo: the only alternative is to freeze everything.

Having said that, what you are asking can best be managed, within the Arch framework by doing two things:

  1. updating regularly (so that you are only upgrading small numbers of packages at a time) and using the logs in /var/log/pacman.log to provide a list of packages to rollback if something does go wrong.

  2. Not clearing the cache of packages prematurely, or—if you need the space—before you do issue a pacman -Sc or pacman -Scc, then backing up /var/cache/pacman/pkg/ to an external drive so that you have access to older versions if you do need to downgrade a package or packages.

If you are not running the [Testing] repo, then the reality is there is very little in the way of breakage and when it happens it is well-documented. As wojox noted, reading is a prerequisite for maintaining a well-running Arch Linux installation.

For Linux in general, you can use a tool like Clonezilla to make snapshots of your current install.

Caveat All of the above is referring to your system. You should, of course, have a regime in place to back up your data.

Related Question