From nobody Sat Sep 24 13:47:27 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MZVh40JRJz4cj1c for ; Sat, 24 Sep 2022 13:47:32 +0000 (UTC) (envelope-from tamelingdaniel@gmail.com) Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MZVh337kzz44m0 for ; Sat, 24 Sep 2022 13:47:31 +0000 (UTC) (envelope-from tamelingdaniel@gmail.com) Received: by mail-wm1-x329.google.com with SMTP id r133-20020a1c448b000000b003b494ffc00bso4887268wma.0 for ; Sat, 24 Sep 2022 06:47:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date; bh=ALqjrpleWwr8tEosb47plvccLRiBWcvvnr92kGZTlBA=; b=Gb6VtR7hWGF8alNCO+bAnAiAp7+GKs4fZNTm2JAm4ETeP95Wg4g1HBkI/cG1weRkNO SPnhTAJ8emni6QnUwD2rUqTOQWUIjjSl9ViFgqabBf2VV49NefS0Mp4gHNrYEXvpyUjf y487b24AsnCjqmDRikKGgmsKBWZQY4cf5hgOrHG1marDlWfLkFTZaZto4bmery3izWRW PTzZnn8swyvlyxYaTqABj9ZdFCz4JJU1cc0g4ieH1P2zaCnIK67UfXdcoGg8QESSOuGZ 7IAcSBJX+5PHjXuzPmJX8xIDqiDRpy33tVu07482ueaZ+A0E3/7eDvTyimblQjgbpb42 a38A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=ALqjrpleWwr8tEosb47plvccLRiBWcvvnr92kGZTlBA=; b=l6JgF3qXZylqTFAxP7jxrNoGbUp6PO4OLmoFpCTX38GcGaQqEo8zOFgaPPUQ0I9S4L RQuicByXz6mGEU5k37NVUvx6LmxXdLorq4sBTZqQC8hCgeIAbPux+Ntskdd3MvDWYFc5 IYIW28EBcg2sk/zRabvKApSvs9jBmrOShFLkWJ9ed67O0ydqmmxggPaQj9nzdW7xABMP x/+48KuE9MrzHAzpwGCEu8HWtsf93gnSWKcnuombgDGlUsST1JzUSa0lrBi408m69Jij c1HmN/PMAG3hXBH1CdnkT648A3wFct3gmcTrzqy9y6rmP7LnjdJY3W7eAgYccshWL6Ny as4w== X-Gm-Message-State: ACrzQf1R2XseR7Pkm6knNnNjysetDw519Aj43T2T7P2Rlw+JM+VOx1vg WI0OgIi0+a4Wkt6L4GQbbx8pSXoqda0= X-Google-Smtp-Source: AMsMyM6UfDujiaNkihQfk9aV1RnW0B0QzIh6pRsZBjYGQHIjXad/NZ7XrEzEym0pdab6vzzIcMUi1w== X-Received: by 2002:a05:600c:3483:b0:3b4:99f4:1191 with SMTP id a3-20020a05600c348300b003b499f41191mr8958032wmq.147.1664027249428; Sat, 24 Sep 2022 06:47:29 -0700 (PDT) Received: from localhost (dslb-188-109-244-245.188.109.pools.vodafone-ip.de. [188.109.244.245]) by smtp.gmail.com with ESMTPSA id f12-20020a05600c4e8c00b003b33943ce5esm6121117wmq.32.2022.09.24.06.47.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Sep 2022 06:47:28 -0700 (PDT) Date: Sat, 24 Sep 2022 15:47:27 +0200 From: Daniel Tameling To: freebsd-current@freebsd.org Subject: Re: Good practices with bectl Message-ID: References: <20220921112706.Horde.eNaqpvIqq64Qe7crIQQ9JwX@webmail.leidinger.net> <20220921124452.Horde.BSQPZ4imQhhKUUE0k3W5iFb@webmail.leidinger.net> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4MZVh337kzz44m0 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=Gb6VtR7h; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of tamelingdaniel@gmail.com designates 2a00:1450:4864:20::329 as permitted sender) smtp.mailfrom=tamelingdaniel@gmail.com X-Spamd-Result: default: False [-3.87 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.95)[-0.946]; NEURAL_HAM_LONG(-0.93)[-0.926]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::329:from]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_TLS_LAST(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N On Wed, Sep 21, 2022 at 12:08:38PM +0100, Nuno Teixeira wrote: > Summary: Using bectl for upgrades > > RELEASE=Whatever > > bectl create ${RELEASE} > > bectl mount ${RELEASE} > BASEDIR=/tmp/be_mount.XXXX # Use mount point returned by bectl mount > > [freebsd-update method] > > freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update \ > upgrade -r ${RELEASE} > > freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update install > # Ignore admonitions to reboot, since we're using a boot environment > > freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update install > > bectl activate ${RELEASE} > #> bectl activate -t ${RELEASE} # Failsafe (if the machine is too far away > to simply walk over and > switch to the old BE): > > reboot > > [upgrade from source method] > > make DESTDIR=${BASEDIR} installkernel > > etcupdate -p -D $BASEDIR > > make DESTDIR=${BASEDIR} installworld > > etcupdate -D $BASEDIR > > make DESTDIR=${BASEDIR} -DBATCH_DELETE_OLD_FILES delete-old > delete-old-libs > > bectl activate ${RELEASE} > #> bectl activate -t ${RELEASE} # Failsafe (if the machine is too far away > to simply walk over and > switch to the old BE): > > reboot > Would it be possible to add this to the handbook? I know that I will be looking for it when I upgrade next time. Best regards, Daniel