From owner-freebsd-fs@freebsd.org Sat Aug 11 17:17:51 2018 Return-Path: Delivered-To: freebsd-fs@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 16E1810746DC for ; Sat, 11 Aug 2018 17:17:51 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0DAF89F97 for ; Sat, 11 Aug 2018 17:17:50 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from gjp by mail.in-addr.com with local (Exim 4.91 (FreeBSD)) (envelope-from ) id 1foXWO-0008fG-RI; Sat, 11 Aug 2018 18:17:48 +0100 Date: Sat, 11 Aug 2018 18:17:48 +0100 From: Gary Palmer To: Dmitry Morozovsky Cc: freebsd-fs@freebsd.org Subject: Re: ZFS backup Q: send/recv and mountpoint property Message-ID: <20180811171748.GC83321@in-addr.com> References: <20180804220727.GA83288@in-addr.com> <20180810144804.GA83321@in-addr.com> <20180810145521.GB83321@in-addr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180810145521.GB83321@in-addr.com> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Aug 2018 17:17:51 -0000 On Fri, Aug 10, 2018 at 03:55:21PM +0100, Gary Palmer wrote: > On Fri, Aug 10, 2018 at 05:52:03PM +0300, Dmitry Morozovsky wrote: > > On Fri, 10 Aug 2018, Gary Palmer wrote: > > > > > > > On my backup server I have two pools, zfsroot and data. I think I set > > > > > things up, and then exported data so that it's not auto-imported at boot. > > > > > I then put this in /etc/rc.local > > > > > > > > > > zpool import -N -R /backups data > > > > > > > > > > It lets the pool import filesystems with paths like / or /home > > > > > without over-writing the paths on the local system. > > > > > > > > that would fit for "normal" case, but does not survive sudden reboot ;-) > > > > > > > > I'm switching to zxfer for now; not ideal, but fair and usable enough > > > > > > Hi, > > > > > > I haven't tested reboot during sync, but I'm not sure why a sudden > > > reboot would cause issues - the -R should move mounts outside > > > critical areas. Could you elaborate please? > > > > yes, that would be exactly the case I'm referring: reboot when your data pool > > is *not* exported > > Hi Dmitry, > > I don't think that's a problem. I don't export the pool before rebooting, > I just shut down the box and boot it the next time I need to do a backup > The -R flag prevents the pool from being written to the cache file which > should stop import on boot. Note that I'm running FreebSD 10.4-p > currently. Need to upgrade to 11.2 and see if that still works. Just upgraded to 11.2 and no obvious issues so far with the above scheme Regards, Gary