From owner-freebsd-questions@freebsd.org Wed Jul 15 23:20:55 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D5D33729E6 for ; Wed, 15 Jul 2020 23:20:55 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from holgerdanske.com (holgerdanske.com [184.105.128.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "holgerdanske.com", Issuer "holgerdanske.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6YKK4vvqz4dJQ for ; Wed, 15 Jul 2020 23:20:53 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from 99.100.19.101 ([99.100.19.101]) by holgerdanske.com with ESMTPSA (TLS_AES_128_GCM_SHA256:TLSv1.3:Kx=any:Au=any:Enc=AESGCM(128):Mac=AEAD) (SMTP-AUTH username dpchrist@holgerdanske.com, mechanism PLAIN) for ; Wed, 15 Jul 2020 16:20:43 -0700 Subject: Re: Backup before reinstall To: freebsd-questions@freebsd.org References: <20200715153213.5961e091@uni-dortmund.de> From: David Christensen Message-ID: <9e4e6120-8400-0f77-3c21-f48349fecdbc@holgerdanske.com> Date: Wed, 15 Jul 2020 16:20:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200715153213.5961e091@uni-dortmund.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4B6YKK4vvqz4dJQ X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of dpchrist@holgerdanske.com has no SPF policy when checking 184.105.128.27) smtp.mailfrom=dpchrist@holgerdanske.com X-Spamd-Result: default: False [2.32 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_MEDIUM(0.77)[0.773]; DMARC_NA(0.00)[holgerdanske.com]; NEURAL_HAM_SHORT(-0.02)[-0.016]; NEURAL_SPAM_LONG(0.66)[0.665]; RCVD_IN_DNSWL_NONE(0.00)[184.105.128.27:from]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:184.104.0.0/15, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 23:20:55 -0000 On 2020-07-15 06:32, Christian Baer wrote: > Greetings Programs! :-) > > One of my boxes is still running FreeBSD 10. Everything is updated to > include the latest patches, but the time has come to move on. :-) > > Trying an update over multiple major releases is almost guaranteed to > break the system - even if it's done in steps - so I have decided to > reinstall everything. This will also get rid of some redundant stuff I > have installed. > > This machine is used as a server and I haven't installed X at all. What > I do utilize heavily is Geli and ZFS (als RAIDZ2). > > I don't mind reconfiguring a few things on foot after the reinstall. > But I really want to be able to access my encrypted RAIDZ again. :-) > > The system boots from a 128GB SSD. This holds all the partitions for /, > /usr /var and swap. Nothing on the SSD is encrypted, because I want the > system to be able to boot without any "help". This is the only physical > device that will get erased during the reinstall. > > > The raidz has it's own mountpoint (under /zfs) and contains three > subvolumes, which are mounted in different places (one of them is > /home). The raidz spans seven HDDs, which are all encrypted with geli. > To be clear: The drives were encrypted first and the raidz spans the > encrypted (.eli) devices. > > The setup isn't really too complicated. What I don't know is where > FreeBSD stored the information about what belongs to the raidz etc. Is > there something special I need to backup to be sure all of this is > reusable again? > > I could of course backup the whole SSD. But there is a lot of junk > there I won't need again (most of the data probably), so if I can, I > would try to only backup the useful stuff. > > I would appriciate any advice! > > Cheers! > Chris > > P.S. Before anyone tells me that backups are important: I have backups, > but only of the data on the raidz. This is what I considered to be > important, not so much the system. So if this goes wrong, I could > restore everything, but that would take much longer than I'd care to > sit in front of the computer. :-P I have a SOHO LAN with a FreeBSD server (12.1-RELEASE, ZFS, jails, Samba, and CVS) and Linux, Windows, macOS, and iOS clients. I put my system images on separate devices (2.5" SATA SSD). I put my data, backups, archives, and images on other devices (3.5" SATA HDD, optical media). I install mobile racks in my desktops and servers. I have a stack of SSD's with one OS on each. I strive to configure my systems so that I can mix and match system drives, data drives, and chassis as required. I backup my system images in multiple ways (deliberate overkill): 1. I create a CVS project for every system: a. Plain text administrator log. b. Any created or modified system configuration files (e.g. /etc/*). c. Other files as required. 2. I use ZFS boot and root, and install with copies=2. 3. I use zfs-auto-snapshot for boot and root. 4. I take raw images with dd(1) as required and periodically. 5. I do a daily rsync(1) of the contents of the root file system to a "backup" ZFS filesystem (which also has zfs-auto-snapshot). (ZFS replication would be faster, but rsync might stop a ZFS send and/or receive bug.) For OS major upgrades, I prefer to do a fresh install on another computer, and then migrate data and services. But, this requires twice the hardware. Thus, I have spare computers (and lots of parts). For an in-place migration on a single computer, I remove the old system drive, disconnect data the drives, insert a blank system drive, install, update the OS, connect the data drives, check out the old configuration files to an alternate location, migrate settings by hand, and bring services up one by one. Next steps include taking an image of the new system drive and adjusting backup/ archive processes. AIUI ZFS metadata is stored inside the ZFS virtual devices. So, unless you are doing things with /etc/fstab or otherwise, I have found that ZFS "just works" whenever I rearrange ZFS devices. If you use ZFS on boot and root via the FreeBSD installer, one problem I have not solved is that the pool with the boot filesystem is named "bootpool" on every FreeBSD system. I have not attempted to change the pool name, because I assume this will break the boot process. But if I insert two drives with two bootpool's into the same system, strange things happen. If anyone has a solution or work-around, please advise. David