From owner-freebsd-questions@freebsd.org Thu Feb 21 02:21:40 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 0098514E99AB for ; Thu, 21 Feb 2019 02:21:40 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E32D84A6F for ; Thu, 21 Feb 2019 02:21:38 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([92.193.157.173]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPA (Nemesis) id 1M1qbm-1guR481owy-002FTK; Thu, 21 Feb 2019 03:21:24 +0100 Date: Thu, 21 Feb 2019 03:21:21 +0100 From: Polytropon To: "@lbutlr" Cc: Farhan Khan via freebsd-questions Subject: Re: Duplicating file system Message-Id: <20190221032121.c0006dfe.freebsd@edvax.de> In-Reply-To: <0F4BBC09-3F9D-4740-A8E4-BB3B87F2A657@kreme.com> References: <0A33E3BE-96C9-4D83-B9F7-D4D2792B5161@kreme.com> <32153EA7-4BC5-4EE2-98FA-5BDEE1903BA3@cretaforce.gr> <4CAB4BC4-0473-41CF-AF03-D1CE796F5545@cretaforce.gr> <0F4BBC09-3F9D-4740-A8E4-BB3B87F2A657@kreme.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:kUxWoS0NaE91TYb/xdCq0ztdwKzD3K7iJjaE97Qo5j92s22LgEV qGwe+R32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ication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.83 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[mx01.schlund.de,mx00.schlund.de]; RCPT_COUNT_TWO(0.00)[2]; RECEIVED_SPAMHAUS_PBL(0.00)[173.157.193.92.zen.spamhaus.org : 127.0.0.10]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:217.72.192.0/20, country:DE]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.35)[0.346,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.96)[0.963,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.97)[0.973,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[74.192.72.217.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.16)[ip: (-1.13), ipnet: 217.72.192.0/20(0.04), asn: 8560(1.89), country: DE(-0.01)] 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: Thu, 21 Feb 2019 02:21:40 -0000 On Wed, 20 Feb 2019 15:02:07 -0700, @lbutlr wrote: > On 20 Feb 2019, at 13:26, Christos Chatzaras wrote: > > On 20 Feb 2019, at 22:13, Christos Chatzaras wrote: > >> On 20 Feb 2019, at 21:52, Cerebus wrote: > >>> 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. > >>> > >>> How would I do this? > >>> > >>> I don’t 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. > >>> > >>> -- > >>> This is my signature. There are many like it, but this one is mine. > >> > >> If both disks have the same size the easiest but not fastest way is to > >>> use dd: > >> > >> dd if=/dev/ada0 of=/dev/ada1 bs=64k > > > > 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: > > What I want is to copy all of dis1 to disk 2, bootable, but then for disk > 2 to stay updated as new data is written to disk 1. > > So, if a log file updates on disk 1, it is updated on disk 2, if not > instantly, very soon. This is a typical task for a mirroring construct, but you can achieve the same on an automated basis, either using rsync, or cpdup with the appropriate options (only copy what has been changed, reflecting any deletions on the source to the target). With this in mind, I'd start with an 1:1 copy using dd, and from that point on, have a scheduled job of rsync or cpdup in place to have any source changes affect the "copy drive". -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...