Bug 718764

Summary: Have zypper create a snapshot when installing updates to allow to revert system to before / previous state
Product: [openSUSE] openSUSE 11.4 Reporter: Patrick Smart <novell>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Enhancement    
Priority: P4 - Low    
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.4   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Patrick Smart 2011-09-18 23:03:37 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20100101 Firefox/6.0.2

Sometimes, when I do an update with zypper, I find myself with some part of my system not working properly. At that moment, I'd like to be able to revert my system to the situation before the update. zypper could easily, when updating a package, store the version it is updating it from. Using this information, it then just needs a command to be able to revert to one of those previous group of packages versions. This supposes they are either available locally in some cache or in the repository.

Reproducible: Always
Comment 1 Michael Andres 2011-09-19 08:32:47 UTC
Related to FATE#308626 (https://fate.novell.com/308626), though the btrfs snapshot solution is quite hard to apply to existing systems. 

Keeping this as request for a sipmle 'zypper history' command. Based on /var/log/zypp/history package changes could be tracked and reverted. That's of course no perfect snapshot/restore, as old version packages may no longer be available, also changes applied to the system by packges pre/post install scripts may not be reversible...
Comment 2 Patrick Smart 2011-09-19 20:44:02 UTC
I checked https://features.opensuse.org/308626 (to which I have access, not the one you gave) and am not sure to understand the status of it. It seems there were many ideas given but a part of them are done for SLE11 (see last comment there) and, therefore, oS114 is marked as done. This FATE is also linked (related) to itself...

I see there is a 11.4 snapper package though...

I you have the time to clarify, it's welcome but far from critical. TIA!
Comment 3 Michael Andres 2011-09-21 11:21:49 UTC
Frankly I'm not sure either. The snapper idea is to provide a libzypp plugin, which is triggered upon package installation/deletion. The plugin will create the btrfs snapshot, and I suppose snapper will also provide means to restore them. So this is, except for the plugin support, outside the zypp scope.

I just wonder why this is 'done' for 11.4, as libzypp on 11.4 has no support for commit plugins. They are available on SLE and will be on 12.x. Maybe Arvin has some details about this.
Comment 4 Michael Andres 2011-09-21 11:38:26 UTC
Looks like this was a mistake, FATE#308626 will be rejected for 11.4. It will be available on 12.1
Comment 5 Michael Andres 2011-12-07 08:01:17 UTC
Available in 12.1. 
No backport to 11.4.