Date: Sun, 21 Apr 2013 08:46:21 +0100 From: Chris Rees <utisoft@gmail.com> To: Perry Hutchison <perryh@pluto.rain.com> Cc: Xin LI <d@delphij.net>, FreeBSD Mailing List <freebsd-ports@freebsd.org> Subject: Re: non-destructive ports/packages update Message-ID: <CADLo83-U_UNJ6U5wHTs8D86W_kUnwU8aC0fV0brEd4q4f5CmEQ@mail.gmail.com> In-Reply-To: <51733ad5.jgrImeJZdbQoq4dt%perryh@pluto.rain.com> References: <517236fe.7AoqFIleDJvljza6%perryh@pluto.rain.com> <51723A51.20401@delphij.net> <51733ad5.jgrImeJZdbQoq4dt%perryh@pluto.rain.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 21 Apr 2013 02:13, "Perry Hutchison" <perryh@pluto.rain.com> wrote: > > Xin Li <delphij@delphij.net> wrote: > > > On 4/19/13 11:34 PM, Perry Hutchison wrote: > > > I'm looking for a way to move everything connected with ports and > > > packages aside, so that I can start fresh but with the ability to > > > easily roll it back when things go badly (as they surely will). > > > > > > I have in mind to something like this: > > > > > > # cd /usr > > > # mkdir old > > > # mv ports local old > > > # mkdir ports local > > > # cd /var/db > > > # mkdir old > > > # mv ports pkg old > > > # mkdir ports pkg > > > > > > Is there anything else that needs to be saved before fetching a > > > new ports tree and starting to build things (or install prebuilt > > > packages)? > > > > If you use ZFS, it's possible to take snapshot, then install new > > ports, then if something blows up, you can rollback. > > > > With UFS, it's still possible to take snapshot but rollback is not > > atomic. > > I'm aware of filesystem snapshots, but I only want to checkpoint the > ports and packages, not the whole filesystem -- a rollback needs to > be fast, easy, and obviously correct; preserve the failure logs; and > not undo changes that may have been made elsewhere in the meantime. > (BTW I don't use ZFS: the machine doesn't have enough memory, and to > me ZFS -- especially on 8.x -- doesn't yet seem sufficiently proven.) > > > If you use portmaster, it can save packages (I think portupgrade > > can do it too). But this approach depends on the fact that the > > port is well written, and is not atomic in terms of package set. > > And then a rollback requires re-installing the saved packages, which > is surely slower than moving a few directories and/or files around. > > The question is, what (if anything) else -- besides /usr/ports, > /usr/local, /var/db/ports, and /var/db/pkg -- needs to be checkpointed? Are you installing any drivers? You may need to back up /boot too. Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo83-U_UNJ6U5wHTs8D86W_kUnwU8aC0fV0brEd4q4f5CmEQ>