From owner-freebsd-questions@freebsd.org Mon Nov 14 11:14:34 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0EAFC40A4E for ; Mon, 14 Nov 2016 11:14:34 +0000 (UTC) (envelope-from steve@sohara.org) Received: from smtp3.irishbroadband.ie (smtp3.irishbroadband.ie [62.231.32.5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9340012EB for ; Mon, 14 Nov 2016 11:14:34 +0000 (UTC) (envelope-from steve@sohara.org) Received: from [89.127.62.20] (helo=smtp.lan.sohara.org) by smtp3.irishbroadband.ie with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1c6EdL-0004t3-Hh; Mon, 14 Nov 2016 10:37:03 +0000 Received: from [192.168.63.1] (helo=steve.lan.sohara.org) by smtp.lan.sohara.org with smtp (Exim 4.87 (FreeBSD)) (envelope-from ) id 1c6Edp-000KHC-Hm; Mon, 14 Nov 2016 10:37:33 +0000 Date: Mon, 14 Nov 2016 10:36:57 +0000 From: Steve O'Hara-Smith To: Victor Sudakov Cc: freebsd-questions@freebsd.org Subject: Re: zfs send/receive as dump/restore alternative Message-Id: <20161114103657.63c03ab1d039c59db18fad90@sohara.org> In-Reply-To: <20161114054657.GA66229@admin.sibptus.transneft.ru> References: <20161114054657.GA66229@admin.sibptus.transneft.ru> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.29; amd64-portbld-freebsd10.1) X-Clacks-Overhead: "GNU Terry Pratchett" Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2016 11:14:34 -0000 On Mon, 14 Nov 2016 12:46:57 +0700 Victor Sudakov wrote: > Dear Colleagues, > > I now run a couple of systems fully on zfs, and use e.g. > "zfs send -Rv zroot@2016-10-01 > /mnt1/2016-09-25.zfs" > for a full system backup to a remote file server. > > With restore(8), I could restore any separate filesystem or even a single > file/directory from the dump, even interactively. As others have indicated the zfs stream is not designed as an archive format but rather for efficient filesystem replication. > How would you restore a) a single dataset or b) a single file from a > replication stream package? I really need this mode of operation for > undeleting users' files etc. Undoing user mistakes is what snapshots were designed for (among other things). Install zfs-periodic to automate handling a set of hourly, daily, weekly and monthly snapshots (in /.zfs/snapshot/ with nice clear names like hourly-2016-11-14-08). Then there's no need to go to the backups for mistakes, just copy the old version from a suitable snapshot and use send/receive to maintain a near-live disaster recovery copy (preferably offsite). -- Steve O'Hara-Smith