From owner-freebsd-ports@FreeBSD.ORG Sat Apr 20 06:48:55 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BC0091D0 for ; Sat, 20 Apr 2013 06:48:55 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) by mx1.freebsd.org (Postfix) with ESMTP id A3A6C1084 for ; Sat, 20 Apr 2013 06:48:55 +0000 (UTC) Received: from delphij-macbook.local (c-67-188-85-47.hsd1.ca.comcast.net [67.188.85.47]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 07FDF11034; Fri, 19 Apr 2013 23:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1366440534; bh=13YBrKSkfp9UnPr20pRWYRtV7FMGbV+aiefdif2s31k=; h=Date:From:Reply-To:To:Subject:References:In-Reply-To; b=lOI4YONtLZTfQ6Z9fEcN4+ZXXn2mEFQkX/AaBj/A5BAhLGthE74ENVX+F9oYCiF/i DzbSr7HOlr4hOBHvAV9e6olOXRuTNzRyXZbhynQVBWt+8ziKba404dkhbYGPSxMwgE kD5YXxynEs2OfIX/FzVxBvwaUk+EAyrja+e5dXDU= Message-ID: <51723A51.20401@delphij.net> Date: Fri, 19 Apr 2013 23:48:49 -0700 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: freebsd-ports@freebsd.org Subject: Re: non-destructive ports/packages update References: <517236fe.7AoqFIleDJvljza6%perryh@pluto.rain.com> In-Reply-To: <517236fe.7AoqFIleDJvljza6%perryh@pluto.rain.com> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Apr 2013 06:48:55 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 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)? > > This is on 8.1, although I suspect the answer does not depend on > the OS version. And yes, there's plenty of space in /usr and > /var. 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. 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. BTW. Speaking for 8.1, it's past EoL, please consider upgrading to a supported release. Cheers, -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJRcjpRAAoJEG80Jeu8UPuzdjkIAICtMrOW87AWrtE+3FCGbG9d 4XOPZD6fgFw0eOJ4KpaxyW//e4wqILofyoLmpepYTkiZQG+fzQ8sdHLO6WNdqRo8 ilzpzwpmu3rAaI6YvPj90Oz5Er4Q+yGG1u/1jFfWPDpiWOtVlaYC3HdERqoSQCfo NCfjEk6UYjRiRSGfw9qynf87WCinhi8su71+/A0RusuDHXeLQWkgfOPrTerm77KM HBFXKg2F7DlLx9ZdXxv0Tk+8QwHSlYB249oC047MLx/dT0KBOfD2nWK1xhB4pDJo RRbWKUmb0B/aT0FLLD/swWSbx/59menyHDJBG/ZMmxB58vAhSrkPXtu7SNOlZwU= =OSk7 -----END PGP SIGNATURE-----