From owner-freebsd-fs@freebsd.org Sat Aug 4 22:07:30 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 C53EE105478C for ; Sat, 4 Aug 2018 22:07:30 +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 5B21E8A701 for ; Sat, 4 Aug 2018 22:07:30 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from gjp by mail.in-addr.com with local (Exim 4.91 (FreeBSD)) (envelope-from ) id 1fm4hs-000Lfn-6u; Sat, 04 Aug 2018 23:07:28 +0100 Date: Sat, 4 Aug 2018 23:07:28 +0100 From: Gary Palmer To: Dmitry Morozovsky Cc: freebsd-fs@FreeBSD.org Subject: Re: ZFS backup Q: send/recv and mountpoint property Message-ID: <20180804220727.GA83288@in-addr.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, 04 Aug 2018 22:07:30 -0000 On Sun, Jul 22, 2018 at 09:14:05PM +0300, Dmitry Morozovsky wrote: > Colleagues, > > still stuck in compiling stable procedure. > > Prerequisites: > > - some servers, all on ZFS, with layout such as > machine -> unique pool name, usually 2-letters, say, hm and im > > - zfs layouts like > > hm/R/${fs}, like > hm/R > hm/R/usr > hm/R/usr/local > hm/R/var > hm/R/home > etc, where hm/R has property mountpoint=/ and others just inherit it > > > - on servers, zfs allows for non-root user to make snapshots, hold, etc, like > > Local+Descendent permissions: > group operator hold,send,snapshot > > - zfs send -R [-i pool@prev-snap] pool@now-snap | \ > ssh backupserver 'zfs recv tgpool/B/zfs/srvname' > > Problem: > > 0. on backup (zfs recv) server, I could not > - overwrite mountpoint property (and I'd better avoid it) > - add canmount=off, especially for child filesets, as it's not inherited (which > could be preferred behaviour) > > 1. after backup server reboot, if special manual tweaks did not have place, > filesets from backup images overwrite backup filesets, render it unuseable > > Any hints? > > Or did I missed something trivial? > > Thanks, as usual, in advance! Hi, 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. Regards, Gary