From owner-freebsd-questions@freebsd.org Wed Feb 20 20:26:07 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DAA814DA8A2 for ; Wed, 20 Feb 2019 20:26:07 +0000 (UTC) (envelope-from chris@cretaforce.gr) Received: from smtp1.cretaforce.gr (smtp1.cretaforce.gr [159.69.10.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.cretaforce.gr", Issuer "RapidSSL RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41E9E6BCBF for ; Wed, 20 Feb 2019 20:26:06 +0000 (UTC) (envelope-from chris@cretaforce.gr) Received: from server1.cretaforce.gr (server1.cretaforce.gr [138.201.248.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.cretaforce.gr", Issuer "RapidSSL RSA CA 2018" (verified OK)) by smtp1.cretaforce.gr (Postfix) with ESMTPS id 6F9391F987 for ; Wed, 20 Feb 2019 22:26:04 +0200 (EET) Received: from [192.168.2.6] (athedsl-127389.home.otenet.gr [85.75.73.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: chris@cretaforce.gr) by server1.cretaforce.gr (Postfix) with ESMTPSA id 2EF762732E for ; Wed, 20 Feb 2019 22:26:04 +0200 (EET) From: Christos Chatzaras Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: Duplicating file system Date: Wed, 20 Feb 2019 22:26:02 +0200 References: <0A33E3BE-96C9-4D83-B9F7-D4D2792B5161@kreme.com> <32153EA7-4BC5-4EE2-98FA-5BDEE1903BA3@cretaforce.gr> To: FreeBSD Questions In-Reply-To: <32153EA7-4BC5-4EE2-98FA-5BDEE1903BA3@cretaforce.gr> Message-Id: <4CAB4BC4-0473-41CF-AF03-D1CE796F5545@cretaforce.gr> X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 41E9E6BCBF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of chris@cretaforce.gr designates 159.69.10.232 as permitted sender) smtp.mailfrom=chris@cretaforce.gr X-Spamd-Result: default: False [-2.93 / 15.00]; ARC_NA(0.00)[]; SUBJECT_ENDS_SPACES(0.50)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:159.69.10.232]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[cretaforce.gr]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-0.68)[ipnet: 159.69.0.0/16(-1.17), asn: 24940(-2.22), country: DE(-0.01)]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: mail.cretaforce.gr]; NEURAL_HAM_SHORT(-0.85)[-0.846,0]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; RCVD_IN_DNSWL_LOW(-0.10)[232.10.69.159.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:159.69.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2019 20:26:07 -0000 > On 20 Feb 2019, at 22:13, Christos Chatzaras = wrote: >=20 >=20 >=20 >> On 20 Feb 2019, at 21:52, Cerebus wrote: >>=20 >> I have an 11.2 system with two identical SSD drives. Currently I am = using rsnapshot to keep backups of the primary drive on the secondary = drive, but I am interested in having the second drive have a duplicate = copy of the entire file system in a bootable form, updated as the root = drive is modified. >>=20 >> How would I do this? >>=20 >> I don=E2=80=99t really want a RAID0 because I want to also keep the = periodic backups from rsnapshot as the drives are about 10x larger than = my data. >>=20 >> --=20 >> This is my signature. There are many like it, but this one is mine. >=20 > If both disks have the same size the easiest but not fastest way is to = use dd: >=20 > dd if=3D/dev/ada0 of=3D/dev/ada1 bs=3D64k I read again your message and I see that you want to keep the snapshots = in 2nd drive, so instead of using dd you can: 1) Use gpart/newfs to create new partitions/filesystems (smaller than = the 1st disk to have an extra partition for the snapshots) 2) Use dump to make a backup of the filesystems 3) Use restore to restore the data to 2nd disk 4) Use these commands to make the 2nd disk bootable: dd if=3D/dev/ada0 of=3D/dev/ada1 bs=3D512 count=3D40 gpart recover ada1 Then try to change the boot order for the disks from BIOS to see if = everything works as expected.=