You are not logged in.

#1 2013-04-26 11:51:05

Jindur
Member
Registered: 2011-09-29
Posts: 184

a failsafe backup mechanism for pacman

would be nice to have!

I just did pacman -Syu and once again it broke my system. This time I'm no longer able to access 3d-acceleration via dedicated nvidia board. I've already made an appropriate thread in 'Kernel/Hardware', but I also wanted to suggest this, by copy/pasting the "PPS" appendix I wrote here:

Regarding: System breaks in one way or the other after pacman -Syu (happened to me last 5 times out of 15, worst case was I couldn't even start Slim or X):
All of this tinkering is always so exhausting and annoying, it'd be really nice if Arch/pacman could somehow add an easy to use rollback mechanism for cases like this where your system becomes unusable. Some sort of automatic backup of exactly the files affected by doing the pacman -Syu thing (eg linux kernel). Just so you don't have to spend hours of random testing/asking/hoping to sort things out but can go back to where you started in one click/command. For people who want to use Linux to get things done, as opposed to those who love the actual tinkering.
I'm not sure how much longer I will have the spare time available to try and fix it myself and everything, there might come a time where I will have to either drop Arch or just never do pacman -Syu again, if I have too much to do with work and just cannot afford breaking my system with what was supposed to be "updating" anymore sad

Last edited by Jindur (2013-04-26 11:52:22)

Offline

#2 2013-04-26 12:02:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: a failsafe backup mechanism for pacman

Seriously, did you search at all?

Pacman does do exactly what you suggest.  Previous versions of packages are stored in the cache, and you can rollback to those quite easily.  In fact the very words you used - if put into a  google search - would get you information about exactly what you are looking for.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2013-04-26 12:21:33

Jindur
Member
Registered: 2011-09-29
Posts: 184

Re: a failsafe backup mechanism for pacman

Trilby wrote:

Seriously, did you search at all?

Pacman does do exactly what you suggest.  Previous versions of packages are stored in the cache, and you can rollback to those quite easily.  In fact the very words you used - if put into a  google search - would get you information about exactly what you are looking for.

From what I understand there is more involved, for example config files might get moved/renamed/modified automatically and stuff like that, services modified, symlinks created/replaced, afaik it is not as simple as just a package cache rollback (of which I'm well aware).
Sometimes also the user has to manually alter things after the actual update to complete it, a process that he often cannot reverse easily.

Last edited by Jindur (2013-04-26 14:05:50)

Offline

#4 2013-04-26 13:01:41

valr
Member
From: Belgium
Registered: 2012-01-08
Posts: 62

Re: a failsafe backup mechanism for pacman

...and because pacman can't know all the config files that have been modified my users (some files are tracked, others not) then pacman is maybe not the tool for that.

Have you checked at options like filesystem snapshotting or versioning file system ?
Has any arch user ever used such tools as "rollback feature" ?
I would be interested to know.

Offline

#5 2013-04-26 13:28:10

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: a failsafe backup mechanism for pacman

Sorry, in hindsight I was rather abrupt ... should have the morning coffee before posting.

Your second post does clarify what is lacking from the basic mechanisms.  There have been a couple projects aimed at this.  Xyne recently anounced one ... I don't recall the name as it was being discussed in the announcement thread - but check out Xyne's community contribution posts and it should pop up.  I haven't used that tool, but from the discussion it sounded like it was designed just for these purposes.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2013-04-26 14:19:03

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: a failsafe backup mechanism for pacman

Aura, the pacman helper, supports saving and restoring the state of installed packages: https://bbs.archlinux.org/viewtopic.php?id=155778 (see the second post in that thread, by me wink)

And as valr pointed out, one of the ULTIMATE SOLUTIONS would be to setup filesystem snapshots on your computer, but I don't think I ever would have understood the concept of snapshots if they weren't explained to me in the Red Hat System Administration class I took. sad If you're interested, I'll try explaining it:

OK, so, your computer is chugging along. You then "take a snapshot" of your filesystem, which means all of your files are now read-only, and anything you change is kept in a separate area (like RAM or another partition). This is when you upgrade pacman. If you are happy with the upgrade, you combine the read-only snapshot and your changes. If you aren't happy, you simply throw away all your changes and go back to using the snapshot. Snapshots are supported by special software (like LVM) and by special filesystems (like BTRFS).

...that explanation felt HORRIBLE. sad

Offline

#7 2013-04-26 14:53:14

aesiris
Member
Registered: 2012-02-25
Posts: 97

Re: a failsafe backup mechanism for pacman

valr wrote:

...and because pacman can't know all the config files that have been modified my users (some files are tracked, others not) then pacman is maybe not the tool for that.

Have you checked at options like filesystem snapshotting or versioning file system ?
Has any arch user ever used such tools as "rollback feature" ?
I would be interested to know.

In the past I have successfully used btrfs snapshots as a rollback.

Being careful with /boot it is possible to boot anyone of the snapshots independently; but to do so one also has to choose between keeping the whole /home in the snapshot or taking a copy of user config files.

I had this setup during one of the big changes to glibc or filesystem: I had the opportunity to run "pacman -Syu --force" breaking the primary system; going back to the previous snapshot worked fine and was easier than recovering from the errors.

I do not have it anymore after I managed to crash the whole filesystem (stupid typo in grub while I was configuring the swap partition for hibernation).

At the end I decided it is not worth for me. Now I just update carefully and if I have enough time to recover from an eventual failure.

On the other hand, if you are willing to use btrfs, it is not much harder that installing on an usual ext4 and it will be a fun learning experience.

Offline

#8 2013-04-26 18:36:19

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: a failsafe backup mechanism for pacman

Not an installation issue. Moving to "Pacman & Package Upgrade Issues".


Jindur wrote:

All of this tinkering is always so exhausting and annoying, it'd be really nice if Arch/pacman could somehow add an easy to use rollback mechanism for cases like this where your system becomes unusable.

Occasional tinkering is to be expected with Arch, although you seem to be more unlucky than most. You should never need to "spend hours of random testing/asking/hoping" to roll back an upgrade, as there are tools that do this (armh, aura, backpac, etc.), minus manual intervention for config files which should only be needed if you changed them manually in the first place. Nevertheless, rolling back on a rolling release distro is not the right way to handle issues.

If you really do encounter upgrade errors frequently even when following best upgrade practices (updating regularly and interactively, never running "-Sy" without "-u", etc.) then Arch does not seem right for you and you should indeed consider another distro that "just works".


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB