From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: How to roll back a "guix system reconfigure"? Date: Mon, 04 Apr 2016 10:48:31 +0200 Message-ID: <87bn5phi8w.fsf@gnu.org> References: <87inzz7r7m.fsf@gmail.com> <87r3envk3p.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an0Ba-0000yV-6N for help-guix@gnu.org; Mon, 04 Apr 2016 04:48:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1an0BX-0007kq-0e for help-guix@gnu.org; Mon, 04 Apr 2016 04:48:38 -0400 In-Reply-To: <87r3envk3p.fsf@gmail.com> (Alex Kost's message of "Sat, 02 Apr 2016 23:20:10 +0300") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org To: Alex Kost Cc: help-guix@gnu.org Alex Kost skribis: > Chris Marusich (2016-04-02 22:20 +0300) wrote: > >> Hi, >> >> After running a "guix system reconfigure", it is possible to boot to a >> previous version of the system by manually selecting it from the GRUB >> menu. However, if you want to permanently roll back to a previous >> version (e.g., because something broke), it's a nuisance to do this >> every time you boot. Of course, assuming guix is still working after >> the reconfigure, you could simply do another "guix system reconfigure" >> using the previous version of your operating system configuration file, >> but it seems like that shouldn't be necessary. >> >> What is the recommended way to roll back after a "guix system >> reconfigure"? Is it sufficient to manually edit the grub.cfg file to >> remove all mention of the generations after the one to which you want to >> roll back? If you do that, will the gc root(s) associated with the bad >> configuration stay around forever? Would it make sense to add a command >> like "guix system roll-back" or "guix system switch-generation", similar >> to "guix package --roll-back" and "guix package --switch-generation"? > > Yes, I think these things will be added eventually. It's just that no > one has not been interested enough in these features yet to add them. Indeed, but these are definitely things we should add! > Currently there are 2 ways to perform a system roll-back: > > 1. Manually: system generations are just symlinks in "/var/guix/profiles" > directory, so you can change "/var/guix/profiles/system" link to point > to any previous generation. > > 2. Using Emacs interface (you have to run emacs as root): > > - M-x guix-system-generations; > - Press "c" on a generation you want to make current. There=E2=80=99s also a 3rd way to temporarily roll back: from the GRUB menu, select one of the previous generations (very useful for the occasional mistake you make when reconfiguring into a somewhat experimental config!). Ludo=E2=80=99.