From owner-freebsd-questions@freebsd.org  Tue Apr  5 13:16:11 2016
Return-Path: <owner-freebsd-questions@freebsd.org>
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 ED5DFB0399B
 for <freebsd-questions@mailman.ysv.freebsd.org>;
 Tue,  5 Apr 2016 13:16:11 +0000 (UTC)
 (envelope-from moiseev@mezonplus.ru)
Received: from mx.mezonplus.ru (mx.mezonplus.ru [91.211.181.139])
 (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 A8EAC1B39
 for <freebsd-questions@freebsd.org>; Tue,  5 Apr 2016 13:16:11 +0000 (UTC)
 (envelope-from moiseev@mezonplus.ru)
Received: from [192.168.0.102] (nb-latitude.users.mezon.local [192.168.0.102])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128
 bits)) (No client certificate requested)
 by mx.mezonplus.ru (Postfix) with ESMTPSA id 5B31663EA7
 for <freebsd-questions@freebsd.org>; Tue,  5 Apr 2016 16:09:17 +0300 (MSK)
Subject: Re: FreeBSD ZFS snapshots and "previous versions"
To: freebsd-questions@freebsd.org
References: <CABnVG=eYEzGamSMN6CZYJhRLfjry6cQVq=MsJaPShO_WeFwttA@mail.gmail.com>
From: Alexander Moisseev <moiseev@mezonplus.ru>
Message-ID: <164c1dc9-3474-8560-6e7d-a69fc184f2b6@mezonplus.ru>
Date: Tue, 5 Apr 2016 16:09:17 +0300
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:48.0) Gecko/20100101
 Thunderbird/48.0a1
MIME-Version: 1.0
In-Reply-To: <CABnVG=eYEzGamSMN6CZYJhRLfjry6cQVq=MsJaPShO_WeFwttA@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Apr 2016 13:16:12 -0000

On 30.03.2016 12:31, Gabor Radnai wrote:
> Hi,
>
> If I understand correctly OP wants to use Windows feature called 'Previous
> Version' off from BSD filer.
> This can be done on FreeBSD + Samba4 adding followings to smb4.conf:
>
>         vfs objects = shadow_copy2
>         shadow:format       = %Y-%m-%d_%H.%M.%S--1h
>         shadow:sort         = desc
>         shadow:mountpoint   = <path-to-share>
>         shadow:snapdir      = .zfs/snapshot
>         shadow:localtime    = yes
>
> format is customizable and zfs snapshot should be aligned accordingly
> obviously.
>
> Hope it helps.
> _______________________________________________

FYI It's broken in Samba 4.1 and newer:
https://bugzilla.samba.org/show_bug.cgi?id=11658