source: vendor/current/docs/manpages/vfs_shadow_copy2.8

Last change on this file was 989, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.7

File size: 13.2 KB
Line 
1'\" t
2.\" Title: vfs_shadow_copy2
3.\" Author: [see the "AUTHOR" section]
4.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
5.\" Date: 10/25/2016
6.\" Manual: System Administration tools
7.\" Source: Samba 4.4
8.\" Language: English
9.\"
10.TH "VFS_SHADOW_COPY2" "8" "10/25/2016" "Samba 4\&.4" "System Administration tools"
11.\" -----------------------------------------------------------------
12.\" * Define some portability stuff
13.\" -----------------------------------------------------------------
14.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15.\" http://bugs.debian.org/507673
16.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18.ie \n(.g .ds Aq \(aq
19.el .ds Aq '
20.\" -----------------------------------------------------------------
21.\" * set default formatting
22.\" -----------------------------------------------------------------
23.\" disable hyphenation
24.nh
25.\" disable justification (adjust text to left margin only)
26.ad l
27.\" -----------------------------------------------------------------
28.\" * MAIN CONTENT STARTS HERE *
29.\" -----------------------------------------------------------------
30.SH "NAME"
31vfs_shadow_copy2 \- Expose snapshots to Windows clients as shadow copies\&.
32.SH "SYNOPSIS"
33.HP \w'\ 'u
34vfs objects = shadow_copy2
35.SH "DESCRIPTION"
36.PP
37This VFS module is part of the
38\fBsamba\fR(7)
39suite\&.
40.PP
41The
42vfs_shadow_copy2
43VFS module offers a functionality similar to Microsoft Shadow Copy services\&. When set up properly, this module allows Microsoft Shadow Copy clients to browse through file system snapshots as "shadow copies" on Samba shares\&.
44.PP
45This is a second implementation of a shadow copy module which has the following additional features (compared to the original
46\fBshadow_copy\fR(8)
47module):
48.sp
49.RS 4
50.ie n \{\
51\h'-04' 1.\h'+01'\c
52.\}
53.el \{\
54.sp -1
55.IP " 1." 4.2
56.\}
57There is no need any more to populate your share\*(Aqs root directory with symlinks to the snapshots if the file system stores the snapshots elsewhere\&. Instead, you can flexibly configure the module where to look for the file system snapshots\&. This can be very important when you have thousands of shares, or use [homes]\&.
58.RE
59.sp
60.RS 4
61.ie n \{\
62\h'-04' 2.\h'+01'\c
63.\}
64.el \{\
65.sp -1
66.IP " 2." 4.2
67.\}
68Snapshot directories need not be in one fixed central place but can be located anywhere in the directory tree\&. This mode helps to support file systems that offer snapshotting of particular subtrees, for example the GPFS independent file sets\&.
69.RE
70.sp
71.RS 4
72.ie n \{\
73\h'-04' 3.\h'+01'\c
74.\}
75.el \{\
76.sp -1
77.IP " 3." 4.2
78.\}
79Vanity naming for snapshots: snapshots can be named in any format compatible with str[fp]time conversions\&.
80.RE
81.sp
82.RS 4
83.ie n \{\
84\h'-04' 4.\h'+01'\c
85.\}
86.el \{\
87.sp -1
88.IP " 4." 4.2
89.\}
90Timestamps can be represented in localtime rather than UTC\&.
91.RE
92.sp
93.RS 4
94.ie n \{\
95\h'-04' 5.\h'+01'\c
96.\}
97.el \{\
98.sp -1
99.IP " 5." 4.2
100.\}
101The inode number of the files can optionally be altered to be different from the original\&. This fixes the \*(Aqrestore\*(Aq button in the Windows GUI to work without a sharing violation when serving from file systems, like GPFS, that return the same device and inode number for the snapshot file and the original\&.
102.RE
103.sp
104.RS 4
105.ie n \{\
106\h'-04' 6.\h'+01'\c
107.\}
108.el \{\
109.sp -1
110.IP " 6." 4.2
111.\}
112Shadow copy results are by default sorted before being sent to the client\&. This is beneficial for filesystems that don\*(Aqt read directories alphabetically (the default unix)\&. Sort ordering can be configured and sorting can be turned off completely if the file system sorts its directory listing\&.
113.RE
114.sp
115.RE
116.PP
117This module is stackable\&.
118.SH "CONFIGURATION"
119.PP
120vfs_shadow_copy2
121relies on a filesystem snapshot implementation\&. Many common filesystems have native support for this\&.
122.PP
123Filesystem snapshots must be available under specially named directories in order to be recognized by
124vfs_shadow_copy2\&. These snapshot directory is typically a direct subdirectory of the share root\*(Aqs mountpoint but there are other modes that can be configured with the parameters described in detail below\&.
125.PP
126The snapshot at a given point in time is expected in a subdirectory of the snapshot directory where the snapshot\*(Aqs directory is expected to be a formatted version of the snapshot time\&. The default format which can be changed with the
127shadow:format
128option is @GMT\-YYYY\&.MM\&.DD\-hh\&.mm\&.ss, where:
129.sp
130.RS 4
131.ie n \{\
132\h'-04'\(bu\h'+03'\c
133.\}
134.el \{\
135.sp -1
136.IP \(bu 2.3
137.\}
138YYYY
139is the 4 digit year
140.RE
141.sp
142.RS 4
143.ie n \{\
144\h'-04'\(bu\h'+03'\c
145.\}
146.el \{\
147.sp -1
148.IP \(bu 2.3
149.\}
150MM
151is the 2 digit month
152.RE
153.sp
154.RS 4
155.ie n \{\
156\h'-04'\(bu\h'+03'\c
157.\}
158.el \{\
159.sp -1
160.IP \(bu 2.3
161.\}
162DD
163is the 2 digit day
164.RE
165.sp
166.RS 4
167.ie n \{\
168\h'-04'\(bu\h'+03'\c
169.\}
170.el \{\
171.sp -1
172.IP \(bu 2.3
173.\}
174hh
175is the 2 digit hour
176.RE
177.sp
178.RS 4
179.ie n \{\
180\h'-04'\(bu\h'+03'\c
181.\}
182.el \{\
183.sp -1
184.IP \(bu 2.3
185.\}
186mm
187is the 2 digit minute
188.RE
189.sp
190.RS 4
191.ie n \{\
192\h'-04'\(bu\h'+03'\c
193.\}
194.el \{\
195.sp -1
196.IP \(bu 2.3
197.\}
198ss
199is the 2 digit second\&.
200.RE
201.sp
202.RE
203.PP
204The
205vfs_shadow_copy2
206snapshot naming convention can be produced with the following
207\fBdate\fR(1)
208command:
209.sp
210.if n \{\
211.RS 4
212.\}
213.nf
214 TZ=GMT date +@GMT\-%Y\&.%m\&.%d\-%H\&.%M\&.%S
215
216.fi
217.if n \{\
218.RE
219.\}
220.SH "OPTIONS"
221.PP
222shadow:mountpoint = MOUNTPOINT
223.RS 4
224With this parameter, one can specify the mount point of the filesystem that contains the share path\&. Usually this mount point is automatically detected\&. But for some constellations, in particular tests, it can be convenient to be able to specify it\&.
225.sp
226Example: shadow:mountpoint = /path/to/filesystem
227.sp
228Default: shadow:mountpoint = NOT SPECIFIED
229.RE
230.PP
231shadow:snapdir = SNAPDIR
232.RS 4
233Path to the directory where the file system of the share keeps its snapshots\&. If an absolute path is specified, it is used as\-is\&. If a relative path is specified, then it is taken relative to the mount point of the filesystem of the share root\&. (See
234shadow:mountpoint\&.)
235.sp
236Note that
237shadow:snapdirseverywhere
238depends on this parameter and needs a relative path\&. Setting an absolute path disables
239shadow:snapdirseverywhere\&.
240.sp
241Note that the
242shadow:crossmountpoints
243option also requires a relative snapdir\&. Setting an absolute path disables
244shadow:crossmountpoints\&.
245.sp
246Example: shadow:snapdir = /some/absolute/path
247.sp
248Default: shadow:snapdir = \&.snapshots
249.RE
250.PP
251shadow:basedir = BASEDIR
252.RS 4
253The basedir option allows one to specify a directory between the share\*(Aqs mount point and the share root, relative to which the file system\*(Aqs snapshots are taken\&.
254.sp
255For example, if
256.sp
257.RS 4
258.ie n \{\
259\h'-04'\(bu\h'+03'\c
260.\}
261.el \{\
262.sp -1
263.IP \(bu 2.3
264.\}
265basedir = mountpoint/rel_basedir
266.RE
267.sp
268.RS 4
269.ie n \{\
270\h'-04'\(bu\h'+03'\c
271.\}
272.el \{\
273.sp -1
274.IP \(bu 2.3
275.\}
276share_root = basedir/rel_share_root
277.RE
278.sp
279.RS 4
280.ie n \{\
281\h'-04'\(bu\h'+03'\c
282.\}
283.el \{\
284.sp -1
285.IP \(bu 2.3
286.\}
287snapshot_path = mountpoint/snapdir
288.sp
289or
290snapshot_path = snapdir
291if snapdir is absolute
292.RE
293.sp
294.RE
295then the snapshot of a
296file = mountpoint/rel_basedir/rel_share_root/rel_file
297at a time TIME will be found under
298snapshot_path/FS_GMT_TOKEN(TIME)/rel_share_root/rel_file, where FS_GMT_TOKEN(TIME) is the timestamp string belonging to TIME in the format required by the file system\&. (See
299shadow:format\&.)
300.sp
301The default for the basedir is the mount point of the file system of the share root (see
302shadow:mountpoint)\&.
303.sp
304Note that the
305shadow:snapdirseverywhere
306and
307shadow:crossmountpoints
308options are incompatible with
309shadow:basedir
310and disable the basedir setting\&.
311.RE
312.PP
313shadow:snapsharepath = SNAPSHAREPATH
314.RS 4
315With this parameter, one can specify the path of the share\*(Aqs root directory in snapshots, relative to the snapshot\*(Aqs root directory\&. It is an alternative method to
316shadow:basedir, allowing greater control\&.
317.sp
318For example, if within each snapshot the files of the share have a
319path/to/share/
320prefix, then
321shadow:snapsharepath
322can be set to
323path/to/share\&.
324.sp
325With this parameter, it is no longer assumed that a snapshot represents an image of the original file system or a portion of it\&. For example, a system could perform backups of only files contained in shares, and then expose the backup files in a logical structure:
326.sp
327.RS 4
328.ie n \{\
329\h'-04'\(bu\h'+03'\c
330.\}
331.el \{\
332.sp -1
333.IP \(bu 2.3
334.\}
335share1/
336.RE
337.sp
338.RS 4
339.ie n \{\
340\h'-04'\(bu\h'+03'\c
341.\}
342.el \{\
343.sp -1
344.IP \(bu 2.3
345.\}
346share2/
347.RE
348.sp
349.RS 4
350.ie n \{\
351\h'-04'\(bu\h'+03'\c
352.\}
353.el \{\
354.sp -1
355.IP \(bu 2.3
356.\}
357\&.\&.\&./
358.RE
359.sp
360.RE
361Note that the
362shadow:snapdirseverywhere
363and the
364shadow:basedir
365options are incompatible with
366shadow:snapsharepath
367and disable
368shadow:snapsharepath
369setting\&.
370.sp
371Example: shadow:snapsharepath = path/to/share
372.sp
373Default: shadow:snapsharepath = NOT SPECIFIED
374.RE
375.PP
376shadow:sort = asc/desc
377.RS 4
378By default, this module sorts the shadow copy data alphabetically before sending it to the client\&. With this parameter, one can specify the sort order\&. Possible known values are desc (descending, the default) and asc (ascending)\&. If the file system lists directories alphabetically sorted, one can turn off sorting in this module by specifying any other value\&.
379.sp
380Example: shadow:sort = asc
381.sp
382Example: shadow:sort = none
383.sp
384Default: shadow:sort = desc
385.RE
386.PP
387shadow:localtime = yes/no
388.RS 4
389This is an optional parameter that indicates whether the snapshot names are in UTC/GMT or in local time\&. If it is disabled then UTC/GMT is expected\&.
390.sp
391shadow:localtime = no
392.RE
393.PP
394shadow:format = format specification for snapshot names
395.RS 4
396This is an optional parameter that specifies the format specification for the naming of snapshots in the file system\&. The format must be compatible with the conversion specifications recognized by str[fp]time\&.
397.sp
398Default: shadow:format = "@GMT\-%Y\&.%m\&.%d\-%H\&.%M\&.%S"
399.RE
400.PP
401shadow:sscanf = yes/no
402.RS 4
403This parameter can be used to specify that the time in format string is given as an unsigned long integer (%lu) rather than a time strptime() can parse\&. The result must be a unix time_t time\&.
404.sp
405Default: shadow:sscanf = no
406.RE
407.PP
408shadow:fixinodes = yes/no
409.RS 4
410If you enable
411shadow:fixinodes
412then this module will modify the apparent inode number of files in the snapshot directories using a hash of the files path\&. This is needed for snapshot systems where the snapshots have the same device:inode number as the original files (such as happens with GPFS snapshots)\&. If you don\*(Aqt set this option then the \*(Aqrestore\*(Aq button in the shadow copy UI will fail with a sharing violation\&.
413.sp
414Default: shadow:fixinodes = no
415.RE
416.PP
417shadow:snapdirseverywhere = yes/no
418.RS 4
419If you enable
420shadow:snapdirseverywhere
421then this module will look out for snapshot directories in the current working directory and all parent directories, stopping at the mount point by default\&. But see
422shadow:crossmountpoints
423how to change that behaviour\&.
424.sp
425An example where this is needed are independent filesets in IBM\*(Aqs GPFS, but other filesystems might support snapshotting only particular subtrees of the filesystem as well\&.
426.sp
427Note that
428shadow:snapdirseverywhere
429depends on
430shadow:snapdir
431and needs it to be a relative path\&. Setting an absolute snapdir path disables
432shadow:snapdirseverywhere\&.
433.sp
434Note that this option is incompatible with the
435shadow:basedir
436option and removes the
437shadow:basedir
438setting by itself\&.
439.sp
440Example: shadow:snapdirseverywhere = yes
441.sp
442Default: shadow:snapdirseverywhere = no
443.RE
444.PP
445shadow:crossmountpoints = yes/no
446.RS 4
447This option is effective in the case of
448shadow:snapdirseverywhere = yes\&. Setting this option makes the module not stop at the first mount point encountered when looking for snapdirs, but lets it search potentially all through the path instead\&.
449.sp
450An example where this is needed are independent filesets in IBM\*(Aqs GPFS, but other filesystems might support snapshotting only particular subtrees of the filesystem as well\&.
451.sp
452Note that
453shadow:crossmountpoints
454depends on
455shadow:snapdir
456and needs it to be a relative path\&. Setting an absolute snapdir path disables
457shadow:crossmountpoints\&.
458.sp
459Note that this option is incompatible with the
460shadow:basedir
461option and removes the
462shadow:basedir
463setting by itself\&.
464.sp
465Example: shadow:crossmountpoints = yes
466.sp
467Default: shadow:crossmountpoints = no
468.RE
469.SH "EXAMPLES"
470.PP
471Add shadow copy support to user home directories:
472.sp
473.if n \{\
474.RS 4
475.\}
476.nf
477 \fI[homes]\fR
478 \m[blue]\fBvfs objects = shadow_copy2\fR\m[]
479 \m[blue]\fBshadow:snapdir = /data/snapshots\fR\m[]
480 \m[blue]\fBshadow:basedir = /data/home\fR\m[]
481 \m[blue]\fBshadow:sort = desc\fR\m[]
482.fi
483.if n \{\
484.RE
485.\}
486.SH "CAVEATS"
487.PP
488This is not a backup, archival, or version control solution\&.
489.PP
490With Samba or Windows servers,
491vfs_shadow_copy2
492is designed to be an end\-user tool only\&. It does not replace or enhance your backup and archival solutions and should in no way be considered as such\&. Additionally, if you need version control, implement a version control system\&.
493.SH "VERSION"
494.PP
495This man page is correct for version 4\&.0 of the Samba suite\&.
496.SH "AUTHOR"
497.PP
498The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
Note: See TracBrowser for help on using the repository browser.