1 | <?xml version="1.0" encoding="iso-8859-1"?>
|
---|
2 | <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
|
---|
3 | <refentry id="vfs_shadow_copy2.8">
|
---|
4 |
|
---|
5 | <refmeta>
|
---|
6 | <refentrytitle>vfs_shadow_copy2</refentrytitle>
|
---|
7 | <manvolnum>8</manvolnum>
|
---|
8 | <refmiscinfo class="source">Samba</refmiscinfo>
|
---|
9 | <refmiscinfo class="manual">System Administration tools</refmiscinfo>
|
---|
10 | <refmiscinfo class="version">3.6</refmiscinfo>
|
---|
11 | </refmeta>
|
---|
12 |
|
---|
13 |
|
---|
14 | <refnamediv>
|
---|
15 | <refname>vfs_shadow_copy2</refname>
|
---|
16 | <refpurpose>Expose snapshots to Windows clients as shadow copies.</refpurpose>
|
---|
17 | </refnamediv>
|
---|
18 |
|
---|
19 | <refsynopsisdiv>
|
---|
20 | <cmdsynopsis>
|
---|
21 | <command>vfs objects = shadow_copy2</command>
|
---|
22 | </cmdsynopsis>
|
---|
23 | </refsynopsisdiv>
|
---|
24 |
|
---|
25 | <refsect1>
|
---|
26 | <title>DESCRIPTION</title>
|
---|
27 |
|
---|
28 | <para>This VFS module is part of the
|
---|
29 | <citerefentry><refentrytitle>samba</refentrytitle>
|
---|
30 | <manvolnum>7</manvolnum></citerefentry> suite.</para>
|
---|
31 |
|
---|
32 | <para>The <command>vfs_shadow_copy2</command> VFS module functionality
|
---|
33 | that is similar to Microsoft Shadow Copy services. When setup properly,
|
---|
34 | this module allows Microsoft Shadow Copy clients to browse
|
---|
35 | "shadow copies" on Samba shares.
|
---|
36 | </para>
|
---|
37 |
|
---|
38 | <para>This is a 2nd implementation of a shadow copy module. This
|
---|
39 | version has the following features:</para>
|
---|
40 | <orderedlist continuation="restarts" inheritnum="ignore" numeration="arabic">
|
---|
41 | <listitem><para>You don't need to populate your shares with symlinks to the
|
---|
42 | snapshots. This can be very important when you have thousands of
|
---|
43 | shares, or use [homes].</para></listitem>
|
---|
44 | <listitem><para>The inode number of the files is altered so it is different
|
---|
45 | from the original. This allows the 'restore' button to work
|
---|
46 | without a sharing violation.</para></listitem>
|
---|
47 | </orderedlist>
|
---|
48 |
|
---|
49 | <para>This module is stackable.</para>
|
---|
50 |
|
---|
51 | </refsect1>
|
---|
52 |
|
---|
53 | <refsect1>
|
---|
54 | <title>CONFIGURATION</title>
|
---|
55 |
|
---|
56 | <para><command>vfs_shadow_copy2</command> relies on a filesystem
|
---|
57 | snapshot implementation. Many common filesystems have native
|
---|
58 | support for this.
|
---|
59 | </para>
|
---|
60 |
|
---|
61 | <para>Filesystem snapshots must be mounted on
|
---|
62 | specially named directories in order to be recognized by
|
---|
63 | <command>vfs_shadow_copy2</command>. The snapshot mount points must
|
---|
64 | be immediate children of a the directory being shared.</para>
|
---|
65 |
|
---|
66 | <para>The snapshot naming convention is @GMT-YYYY.MM.DD-hh.mm.ss,
|
---|
67 | where:
|
---|
68 | <itemizedlist>
|
---|
69 | <listitem><para><command>YYYY</command> is the 4 digit year</para></listitem>
|
---|
70 | <listitem><para><command>MM</command> is the 2 digit month</para></listitem>
|
---|
71 | <listitem><para><command>DD</command> is the 2 digit day</para></listitem>
|
---|
72 | <listitem><para><command>hh</command> is the 2 digit hour</para></listitem>
|
---|
73 | <listitem><para><command>mm</command> is the 2 digit minute</para></listitem>
|
---|
74 | <listitem><para><command>ss</command> is the 2 digit second.</para></listitem>
|
---|
75 | </itemizedlist>
|
---|
76 | </para>
|
---|
77 |
|
---|
78 | <para>The <command>vfs_shadow_copy2</command> snapshot naming convention can be
|
---|
79 | produced with the following <citerefentry><refentrytitle>date</refentrytitle>
|
---|
80 | <manvolnum>1</manvolnum></citerefentry> command:
|
---|
81 | <programlisting>
|
---|
82 | TZ=GMT date +@GMT-%Y.%m.%d-%H.%M.%S
|
---|
83 | </programlisting></para>
|
---|
84 |
|
---|
85 | </refsect1>
|
---|
86 |
|
---|
87 | <refsect1>
|
---|
88 | <title>OPTIONS</title>
|
---|
89 |
|
---|
90 | <variablelist>
|
---|
91 | <varlistentry>
|
---|
92 | <term>shadow:snapdir = SNAPDIR
|
---|
93 | </term>
|
---|
94 | <listitem>
|
---|
95 | <para>Path to the directory where snapshots are kept.
|
---|
96 | </para>
|
---|
97 | </listitem>
|
---|
98 | </varlistentry>
|
---|
99 |
|
---|
100 | <varlistentry>
|
---|
101 | <term>shadow:basedir = BASEDIR
|
---|
102 | </term>
|
---|
103 | <listitem>
|
---|
104 | <para>Path to the base directory that snapshots are from.
|
---|
105 | </para>
|
---|
106 | </listitem>
|
---|
107 | </varlistentry>
|
---|
108 |
|
---|
109 | <varlistentry>
|
---|
110 | <term>shadow:sort = asc/desc, or not specified for unsorted (default)
|
---|
111 | </term>
|
---|
112 | <listitem>
|
---|
113 | <para>By this parameter one can specify that the shadow
|
---|
114 | copy directories should be sorted before they are sent to the
|
---|
115 | client. This can be beneficial as unix filesystems are usually
|
---|
116 | not listed alphabetically sorted. If enabled, you typically
|
---|
117 | want to specify descending order.
|
---|
118 | </para>
|
---|
119 | </listitem>
|
---|
120 | </varlistentry>
|
---|
121 |
|
---|
122 | <varlistentry>
|
---|
123 | <term>shadow:localtime = yes/no
|
---|
124 | </term>
|
---|
125 | <listitem>
|
---|
126 | <para>This is an optional parameter that indicates whether the
|
---|
127 | snapshot names are in UTC/GMT or in local time. By default
|
---|
128 | UTC is expected.
|
---|
129 | </para>
|
---|
130 | </listitem>
|
---|
131 | </varlistentry>
|
---|
132 |
|
---|
133 | <varlistentry>
|
---|
134 | <term>shadow:format = format specification for snapshot names
|
---|
135 | </term>
|
---|
136 | <listitem>
|
---|
137 | <para>This is an optional parameter that specifies the format
|
---|
138 | specification for the naming of snapshots. The format must
|
---|
139 | be compatible with the conversion specifications recognized
|
---|
140 | by str[fp]time. The default value is "@GMT-%Y.%m.%d-%H.%M.%S".
|
---|
141 | </para>
|
---|
142 | </listitem>
|
---|
143 | </varlistentry>
|
---|
144 |
|
---|
145 | <varlistentry>
|
---|
146 | <term>shadow:fixinodes = yes/no
|
---|
147 | </term>
|
---|
148 | <listitem>
|
---|
149 | <para>If you enable <command moreinfo="none">shadow:fixinodes
|
---|
150 | </command> then this module will modify the apparent inode
|
---|
151 | number of files in the snapshot directories using a hash of the
|
---|
152 | files path. This is needed for snapshot systems where the
|
---|
153 | snapshots have the same device:inode number as the original
|
---|
154 | files (such as happens with GPFS snapshots). If you don't set
|
---|
155 | this option then the 'restore' button in the shadow copy UI
|
---|
156 | will fail with a sharing violation.
|
---|
157 | </para>
|
---|
158 | </listitem>
|
---|
159 | </varlistentry>
|
---|
160 | </variablelist>
|
---|
161 | </refsect1>
|
---|
162 |
|
---|
163 | <refsect1>
|
---|
164 | <title>EXAMPLES</title>
|
---|
165 |
|
---|
166 | <para>Add shadow copy support to user home directories:</para>
|
---|
167 | <programlisting>
|
---|
168 | <smbconfsection name="[homes]"/>
|
---|
169 | <smbconfoption name="vfs objects">shadow_copy2</smbconfoption>
|
---|
170 | <smbconfoption name="shadow:snapdir">/data/snapshots</smbconfoption>
|
---|
171 | <smbconfoption name="shadow:basedir">/data/home</smbconfoption>
|
---|
172 | <smbconfoption name="shadow:sort">desc</smbconfoption>
|
---|
173 | </programlisting>
|
---|
174 |
|
---|
175 | </refsect1>
|
---|
176 |
|
---|
177 | <refsect1>
|
---|
178 | <title>CAVEATS</title>
|
---|
179 |
|
---|
180 | <para>This is not a backup, archival, or version control solution.
|
---|
181 | </para>
|
---|
182 |
|
---|
183 | <para>With Samba or Windows servers,
|
---|
184 | <command>vfs_shadow_copy2</command> is designed to be an end-user
|
---|
185 | tool only. It does not replace or enhance your backup and
|
---|
186 | archival solutions and should in no way be considered as
|
---|
187 | such. Additionally, if you need version control, implement a
|
---|
188 | version control system.</para>
|
---|
189 |
|
---|
190 | </refsect1>
|
---|
191 |
|
---|
192 |
|
---|
193 |
|
---|
194 | <refsect1>
|
---|
195 | <title>VERSION</title>
|
---|
196 |
|
---|
197 | <para>This man page is correct for version 3.2.7 of the Samba suite.
|
---|
198 | </para>
|
---|
199 | </refsect1>
|
---|
200 |
|
---|
201 | <refsect1>
|
---|
202 | <title>AUTHOR</title>
|
---|
203 |
|
---|
204 | <para>The original Samba software and related utilities
|
---|
205 | were created by Andrew Tridgell. Samba is now developed
|
---|
206 | by the Samba Team as an Open Source project similar
|
---|
207 | to the way the Linux kernel is developed.</para>
|
---|
208 |
|
---|
209 | </refsect1>
|
---|
210 |
|
---|
211 | </refentry>
|
---|