From owner-freebsd-questions@freebsd.org Sat Oct 5 12:35:30 2019 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 D99EB13221D for ; Sat, 5 Oct 2019 12:35:30 +0000 (UTC) (envelope-from aimass@yabarana.com) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46lmRj2vr4z3CN6 for ; Sat, 5 Oct 2019 12:35:29 +0000 (UTC) (envelope-from aimass@yabarana.com) Received: by mail-lf1-x12d.google.com with SMTP id 72so6289220lfh.6 for ; Sat, 05 Oct 2019 05:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yabarana-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=88HSP/xJ2Q2TsLy8PVdCxQleniNCIqOAHD67E8xz6mg=; b=0BJOD0boZ6Ox6P8uS+4Cm4CpoSJg0MKWaCN9KvW0nt4kjDcK+bi+ggrltuf5ZnOpgj uIAybIwB+wYRcYo+iW1zUVaoeT5l0CU1KgCh24QAo3W0OZSgRjHvyNGluFVSKa6YAFhg 0AxMPt6Eo9mOfpwIhXSgDVpzxpmJ90ihUZekYNJicFvMwhGQezARG1oB7ULVNKAzgKSi Mpm5GYM6snFvVnREx1ZEHRqFNDT5/66uGHPY35alNOmoBiXyh+7lQEDg2+4Tuj38epql 5rGxEpwwuGfS6Sicjh4Yag9RuP3cVoHSmPkE3HtMUi4A6QLJYGx0kHSQy3aVeGg1MSLQ VVQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=88HSP/xJ2Q2TsLy8PVdCxQleniNCIqOAHD67E8xz6mg=; b=HdzWj3tPqp9sg23lNIA/kO6dih7Tbsn4NQ/UZRKSx2sIDAKxntCHFjqoqg/shzEHFp QBePiNg/2vYIkmNih+IsTcwT+ahamC+yY5UG8w94i9yQWxMJZPEX4YVQ6RGMLlHIm2S2 raRBEtVKDM7K1sJD/DzPzzI9M9bNdzfYtotjEphoGJ9tIcejwE/+Z5HdemVmdh+9ekqv ASmnrKYqEUfSMDhwXQIG/j32du9WtlfjhQOYs63R7q4ENHZrXJMnf2bVM9/v7mGn73ex qvUvo+01oYw044u981gUvcSNjvgS6axtPbJoV+z8y3GPWhwlgABcVgrmW/zNqO0e0YWb v5ug== X-Gm-Message-State: APjAAAXbouDfdpXXfBHYjCHpzUqbQtSNBdLlSnrrWv5jU3aTUb3Z7P5y edf26oRCdhSHo5QFgXX9oIqgbBZ3t7Yf6CHaOKDnYb7Ke7Jopg== X-Google-Smtp-Source: APXvYqw5k1xc+tta70UuNEVCR2B/dSFtz0fXvlXYsDTzUyYtnrKnfThoBqD34Zmqr54QefaFNYVQVENBrtFph2I3AVw= X-Received: by 2002:a19:4912:: with SMTP id w18mr11461803lfa.93.1570278927234; Sat, 05 Oct 2019 05:35:27 -0700 (PDT) MIME-Version: 1.0 References: <9177b014-9041-f51e-1856-b6dbdec4afc1@panix.com> <20191005104413.39e3c081.freebsd@edvax.de> In-Reply-To: <20191005104413.39e3c081.freebsd@edvax.de> From: Alejandro Imass Date: Sat, 5 Oct 2019 08:35:15 -0400 Message-ID: Subject: Re: Guides for ZFS Full backup to NFS drive and restore from NFS drive To: Polytropon Cc: FreeBSD Questions X-Rspamd-Queue-Id: 46lmRj2vr4z3CN6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yabarana-com.20150623.gappssmtp.com header.s=20150623 header.b=0BJOD0bo; dmarc=none; spf=pass (mx1.freebsd.org: domain of aimass@yabarana.com designates 2a00:1450:4864:20::12d as permitted sender) smtp.mailfrom=aimass@yabarana.com X-Spamd-Result: default: False [-4.27 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[yabarana-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[yabarana.com]; URI_COUNT_ODD(1.00)[9]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yabarana-com.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[d.2.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.77)[ip: (-8.77), ipnet: 2a00:1450::/32(-2.89), asn: 15169(-2.15), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Sat, 05 Oct 2019 12:35:30 -0000 On Sat, Oct 5, 2019 at 4:44 AM Polytropon wrote: > On Fri, 4 Oct 2019 18:38:49 -0400, Kurt Hackenberg wrote: > > On 2019-10-04 17:20, Alejandro Imass wrote: > > > > > Hi there FreeBSD folk! > > > > > > Are there any easy to follow guides to completely backup a FreeBSD > system > > > to an NFS drive and then restore the complete system from the backup > in the > > > NFS drive? > > > > > > I don't have much NFS expertise but it shouldn't be that complicated. > > > > > > I found this guide but not exactly what I'm looking for: > > > > > > > https://www.dan.me.uk/blog/2012/08/05/full-system-backups-for-freebsd-systems-using-zfs/ > > > > > [...] > Definitely. It is possible (and probably the way to go in this > scenario) to write the "zfs send" result to a file that is accessible > via NFS, first for backup, then have a rescue system handy (for > example, a FreeBSD live system CD, DVD, or USB stick) to boot > the system from again, make any neccessary preparations, and > then run "zfs receive" with the previously mentioned file via NFS > as source. So basically it's what you do with traditional dump > and restore via _files_ stored somewhere else on the network, > but with ZFS tools. :-) > > Or did I misunderstand the question? > > > Nope you definitely understood the question precisely. I have read enough to understand that the process is somewhat the following: 1) zfs snapshot 2) zfs sedn to a file 3) copy the file to the nfs mount 4) reconstruct my zfs raid (the main reason I am doing this) 5) zfs receive But the devil is in the details and I have not found a single fool proof recipe. IMHO the handbook still lacks a lot of practical information about ZFS administration "for dummies". The last time I blindly followed the handbook's limited recipes I did "detach" and the "add" like the handbook suggests, and the reason I am in this predicament in the first place: https://lists.freebsd.org/pipermail/freebsd-questions/2018-November/283219.html Kevin P. Neal knew the answer but came a little bit late after I had inadvertently converted my pool into a stripe :-( I probably wasn't the only one unable to find the right answer to a simple problem in the current documentation: https://forums.freebsd.org/threads/re-attaching-failed-device-to-pool.66027/ IIRC I did offer to collaborate and update the handbook for this particular case (re-attaching a drive with the same uuid) but nobody provided any pointers on who/how the handbook gets updated. What I want to do now is backup the entire system, reconstruct the raid1 pool and then restore the whole system INTACT. If there is no such documented recipe I am willing to fully document it with you guys' expert's help here and then find a way to collaborate with the handbook and add both use cases to it. For the common user like myself I really feel the ZFS section in the handbook needs a lot of work for practical day to day tasks, and the FBSD ZFS Wiki, at least IMHO, doesn't offer much help either. TIA! Alex