From owner-freebsd-fs@FreeBSD.ORG Wed Jun 1 08:03:17 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B84461065672 for ; Wed, 1 Jun 2011 08:03:17 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4D01B8FC1D for ; Wed, 1 Jun 2011 08:03:17 +0000 (UTC) Received: from outgoing.leidinger.net (p5B155DF9.dip.t-dialin.net [91.21.93.249]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 5F755844010; Wed, 1 Jun 2011 10:03:02 +0200 (CEST) Received: from webmail.leidinger.net (webmail.Leidinger.net [IPv6:fd73:10c7:2053:1::3:102]) by outgoing.leidinger.net (Postfix) with ESMTP id A90E833DE; Wed, 1 Jun 2011 10:02:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1306915379; bh=RK5beXdD6Kqq+xvH3FKBo21pgGgPaaz1OkzrVYPXhMY=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=PcUOCFRnm9wtZ2F9Jn70MCw2m+wTGuBmTil5hrioVx/6aoxHWW9oewiMnoFgAALMx sdjhHfETSk0oGFp2343JBvtBmZjrhDCSzXF1q9NqbziU2KErjhjSpTkJhPJ7D5y91z YEwT9ULEbqVNfpCeEPE2wrwf3jmybCKa3M1QEio7fRbsxF+cLyachB0kOleug+SEh+ e7snkKqI1Xum088sqXLBU8lGKcDj9d6PVCQfQRqsAKfKIgENja+VM1mub69FWg4OhL zCKWkNyroPj57hQBffLW0RAfgbbPrYOVqOBeGy2Wh264PBS52Lc8OMOm5X18hx5TZq +KCsDgqiuWfhA== Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.14.4/Submit) id p5182wCa063121; Wed, 1 Jun 2011 10:02:58 +0200 (CEST) (envelope-from Alexander@Leidinger.net) X-Authentication-Warning: webmail.leidinger.net: www set sender to Alexander@Leidinger.net using -f Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Wed, 01 Jun 2011 10:02:58 +0200 Message-ID: <20110601100258.13973yayckqlukvm@webmail.leidinger.net> Date: Wed, 01 Jun 2011 10:02:58 +0200 From: Alexander Leidinger To: Jeremy Chadwick References: <20110601005219.GA11776@icarus.home.lan> In-Reply-To: <20110601005219.GA11776@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.6) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 5F755844010.AF434 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.023, required 6, autolearn=disabled, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10, TW_ZF 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1307520182.95214@k+qRlncsbzoas76I74rm1g X-EBL-Spam-Status: No X-Mailman-Approved-At: Wed, 01 Jun 2011 11:30:17 +0000 Cc: freebsd-fs@freebsd.org Subject: Re: Storing revisions of large files using ZFS snapshots X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2011 08:03:17 -0000 Quoting Jeremy Chadwick (from Tue, 31 May 2011 17:52:19 -0700): > Speaking strictly about ZFS snapshots: > > The mentality of ZFS snapshots seems very similar to that of UFS > snapshots, in the sense that the design/model seems to be oriented > towards "bare-metal" restoration. > > That works generally okay (depends on your view) for administrators, > but depending on your demographic, it almost certainly won't work for > users. > > We've found that in most cases, a user will overwrite or rm a file which > they didn't mean to and wish to restore just that file. They need to do > so quickly and easily. ZFS and UFS snapshots don't make this easy for > them to accomplish (ZFS is easier than UFS in this regard, absolutely). What's hard about doing a cp /path/to/fs/.zfs/snapshot/snap_name/subdir/file /path/to/fs/subdir/ ? If it is hard for the user to determine what is the base dataset for his current place, you could provide a zfs restore script (requirement of the following, feel free to adapt: user is in the dir where he wants to restore, commands not really tested, errors not handled): - zfsrestore list -> base=$(df . | awk '/Mounted on/ {next} {print $6}') -> echo Available snapshots -> ls -1 ${base}/.zfs/snapshot - zfs restore -> base=$(df . | awk '/Mounted on/ {next} {print $6}') -> reminder=$(echo $PWD | sed -e "s:${base}/::g") -> cp -v ${base}/.zfs/snapshot/$arg1/${reminder}/$arg2 . Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137