summaryrefslogtreecommitdiffstats
path: root/docs-xml/manpages/vfs_recycle.8.xml
blob: 71eb061299225b5f3f10665cd250a450a2e74f08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
<refentry id="vfs_recycle.8">

<refmeta>
	<refentrytitle>vfs_recycle</refentrytitle>
	<manvolnum>8</manvolnum>
	<refmiscinfo class="source">Samba</refmiscinfo>
	<refmiscinfo class="manual">System Administration tools</refmiscinfo>
	<refmiscinfo class="version">4.1</refmiscinfo>
</refmeta>


<refnamediv>
	<refname>vfs_recycle</refname>
	<refpurpose>Samba VFS recycle bin</refpurpose>
</refnamediv>

<refsynopsisdiv>
	<cmdsynopsis>
		<command>vfs objects = recycle</command>
	</cmdsynopsis>
</refsynopsisdiv>

<refsect1>
	<title>DESCRIPTION</title>

	<para>This VFS module is part of the
	<citerefentry><refentrytitle>samba</refentrytitle>
	<manvolnum>7</manvolnum></citerefentry> suite.</para>

	<para>The <command>vfs_recycle</command> intercepts file deletion
	requests and moves the affected files to a temporary repository
	rather than deleting them immediately. This gives the same effect
	as the Recycle Bin on Windows computers. </para>

	<para>The Recycle Bin will not appear in Windows Explorer
	views of the network file system (share) nor on any mapped
	drive. Instead, a directory called .recycle will be automatically
	created when the first file is deleted and recycle:repository is
	not configured. If recycle:repository is configured, the name
	of the created directory depends on recycle:repository. Users
	can recover files from the recycle bin. If the recycle:keeptree
	option has been specified, deleted files will be found in a path
	identical with that from which the file was deleted.  </para>


	<para>This module is stackable.</para>

</refsect1>


<refsect1>
	<title>OPTIONS</title>

	<variablelist>

		<varlistentry>
		<term>recycle:repository = PATH</term>
		<listitem>
		<para>Path of the directory where deleted files should be moved.
		</para>
		<para>If this option is not set, the default path .recycle
		is used. </para>
		</listitem>
		</varlistentry>

		<varlistentry>
		<term>recycle:directory_mode = MODE</term>
		<listitem>
		<para>Set MODE to the octal mode the recycle repository
		should be created with.  The recycle repository will be
		created when first file is deleted. If recycle:subdir_mode
		is not set, MODE also applies to subdirectories.
		</para>
		<para>If this option is not set, the default mode
		0700 is used. </para>
		</listitem>
		</varlistentry>

		<varlistentry>
		<term>recycle:subdir_mode = MODE</term>
		<listitem>
		<para>Set MODE to the octal mode with which
		sub directories of the recycle repository should be created.
		</para>
		<para>If this option is not set, subdirectories
		will be created with the mode from recycle:directory_mode.
		</para>
		</listitem>
		</varlistentry>

		<varlistentry>
		<term>recycle:keeptree = BOOL</term>
		<listitem>
		<para>Specifies whether the directory structure should
		be preserved or whether the files in a directory that is being
		deleted should be kept separately in the repository.
		</para>
		</listitem>
		</varlistentry>

		<varlistentry>
		<term>recycle:versions = BOOL</term>
		<listitem>
		<para>If this option is True, two files with the same
		name that are deleted will both be kept in the repository.
		Newer deleted versions of a file will be called
		&quot;Copy #x of filename&quot;.
		</para>
		</listitem>
		</varlistentry>

		<varlistentry>
		<term>recycle:touch = BOOL</term>
		<listitem>
		<para>Specifies whether a file's access date should be
		updated when the file is moved to the repository.
		</para>
		</listitem>
		</varlistentry>

		<varlistentry>
		<term>recycle:touch_mtime = BOOL</term>
		<listitem>
		<para>Specifies whether a file's last modified date should be
		updated when the file is moved to the repository.
		</para>
		</listitem>
		</varlistentry>

		<varlistentry>
		<term>recycle:minsize = BYTES</term>
		<listitem>
		<para>Files that are smaller than the number of bytes
		specified by this parameter will not be put into the
		repository.
		</para>
		</listitem>
		</varlistentry>

		<varlistentry>
		<term>recycle:maxsize = BYTES</term>
		<listitem>
		<para>Files that are larger than the number of bytes
		specified by this parameter will not be put into the
		repository.
		</para>
		</listitem>
		</varlistentry>

		<varlistentry>
		<term>recycle:exclude = LIST</term>
		<listitem>
		<para>List of files that should not be put into the
		repository when deleted, but deleted in the normal way.
		Wildcards such as * and ? are supported.
		</para>
		</listitem>
		</varlistentry>

		<varlistentry>
		<term>recycle:exclude_dir = LIST</term>
		<listitem>
		<para>List of directories whose files should not be put
		into the repository when deleted, but deleted in the
		normal way. Wildcards such as * and ? are supported.
		</para>
		</listitem>
		</varlistentry>

		<varlistentry>
		<term>recycle:noversions = LIST</term>
		<listitem>
		<para>Specifies a list of paths (wildcards such as *
		and ? are supported) for which no versioning should
		be used. Only useful when recycle:versions is enabled.
		</para>
		</listitem>
		</varlistentry>

	</variablelist>
</refsect1>

<refsect1>
	<title>EXAMPLES</title>

	<para>Move files "deleted" on <parameter>share</parameter> to
	<parameter>/data/share/.recycle</parameter> instead of deleting them:
	</para>

<programlisting>
        <smbconfsection name="[share]"/>
	<smbconfoption name="path">/data/share</smbconfoption>
	<smbconfoption name="vfs objects">recycle</smbconfoption>
	<smbconfoption name="recycle:repository">.recycle</smbconfoption>
	<smbconfoption name="recycle:keeptree">yes</smbconfoption>
	<smbconfoption name="recycle:versions">yes</smbconfoption>
</programlisting>

</refsect1>

<refsect1>
	<title>VERSION</title>

	<para>This man page is correct for version 3.0.25 of the Samba suite.
	</para>
</refsect1>

<refsect1>
	<title>AUTHOR</title>

	<para>The 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.</para>

</refsect1>

</refentry>