From owner-freebsd-ports@FreeBSD.ORG Sun Apr 21 07:46:23 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 33F1F5EF for ; Sun, 21 Apr 2013 07:46:23 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-ia0-x235.google.com (mail-ia0-x235.google.com [IPv6:2607:f8b0:4001:c02::235]) by mx1.freebsd.org (Postfix) with ESMTP id 081689A0 for ; Sun, 21 Apr 2013 07:46:22 +0000 (UTC) Received: by mail-ia0-f181.google.com with SMTP id k38so96061iah.26 for ; Sun, 21 Apr 2013 00:46:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=wIQamWtPM84U1ri5miSQXQnS+t/s26A9yCsRYBYmZFs=; b=YM8qM4051dbbQheSeZvBqWIUwJ79wJZ8iUHC7Axj2PAI5wvLqBOYAUBbRGlb+3Ayyt fgk+LfrbAgQi5sJXfM61HJ7oFn+DCxrtFZuF61PeMF9gpHMHM7SaFG788oqt5jQ8KSsP VxDAeFN9wvpOYvClzc9Nd//7IxHAnr5WHBwRUne1Hl1RMg62fx4i1HimkaQYPeH0SlVy niubE+lH/Ww470vGLeOkKYxmsB6XczQWDqGpCNnNOq/GO/sMvg+x0JU9XR2zPb3FD7nS zRuqyuQ2BiPrGiDGYUhlvBdjlzuOKYc1+knxO6T29EXfxWIqkKFHjyEbGnrQvQxFKFl3 tmTQ== MIME-Version: 1.0 X-Received: by 10.50.13.175 with SMTP id i15mr5541765igc.75.1366530381927; Sun, 21 Apr 2013 00:46:21 -0700 (PDT) Received: by 10.64.58.52 with HTTP; Sun, 21 Apr 2013 00:46:21 -0700 (PDT) Received: by 10.64.58.52 with HTTP; Sun, 21 Apr 2013 00:46:21 -0700 (PDT) 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> Date: Sun, 21 Apr 2013 08:46:21 +0100 Message-ID: Subject: Re: non-destructive ports/packages update From: Chris Rees To: Perry Hutchison Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Xin LI , FreeBSD Mailing List X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Apr 2013 07:46:23 -0000 On 21 Apr 2013 02:13, "Perry Hutchison" wrote: > > Xin Li 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