[SMB3][PATCH] snapshots work from Linux!

Steve French smfrench at gmail.com
Fri Aug 10 07:38:31 UTC 2018

    mounting with the "snapshots=" mount parm allows a read-only
    view of a previous version of a file system (see MS-SMB2
    and "timewarp" tokens, section based on the timestamp
    passed in on the snapshots mount parm.

    Add processing to optionally send this create context.

    Example output:

    /mnt1 is mounted with "snapshots=..." and will see an earlier
    version of the directory, with three fewer files than /mnt2
    the current version of the directory.

    root at Ubuntu-17-Virtual-Machine:~/cifs-2.6# cat /proc/mounts | grep cifs
    // /mnt1 cifs

    // /mnt2 cifs

    root at Ubuntu-17-Virtual-Machine:~/cifs-2.6# ls /mnt1
    EmptyDir  newerdir
    root at Ubuntu-17-Virtual-Machine:~/cifs-2.6# ls /mnt1/newerdir

    root at Ubuntu-17-Virtual-Machine:~/cifs-2.6# ls /mnt2
    EmptyDir  file  newerdir  newestdir  timestamp-trace.cap
    root at Ubuntu-17-Virtual-Machine:~/cifs-2.6# ls /mnt2/newerdir

    Snapshots are extremely useful for comparing previous versions of
files or directories,
    and recovering from data corruptions or mistakes.

See attached patch


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-smb3-allow-previous-versions-to-be-mounted-with-snap.patch
Type: text/x-patch
Size: 4692 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180810/f769c1c9/0001-smb3-allow-previous-versions-to-be-mounted-with-snap.bin>

More information about the samba-technical mailing list