unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* How to roll back a "guix system reconfigure"?
@ 2016-04-02 19:20 Chris Marusich
  2016-04-02 20:20 ` Alex Kost
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Marusich @ 2016-04-02 19:20 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 1214 bytes --]

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"?

I ask mainly because I'm just not sure what the "best practice" is
surrounding system-level rollback at this time, and I'd love to know
more.

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to roll back a "guix system reconfigure"?
  2016-04-02 19:20 How to roll back a "guix system reconfigure"? Chris Marusich
@ 2016-04-02 20:20 ` Alex Kost
  2016-04-04  8:48   ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Kost @ 2016-04-02 20:20 UTC (permalink / raw)
  To: Chris Marusich; +Cc: help-guix

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.

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.

-- 
Alex

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to roll back a "guix system reconfigure"?
  2016-04-02 20:20 ` Alex Kost
@ 2016-04-04  8:48   ` Ludovic Courtès
  0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2016-04-04  8:48 UTC (permalink / raw)
  To: Alex Kost; +Cc: help-guix

Alex Kost <alezost@gmail.com> 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’s 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’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-04  8:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-02 19:20 How to roll back a "guix system reconfigure"? Chris Marusich
2016-04-02 20:20 ` Alex Kost
2016-04-04  8:48   ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).