summaryrefslogtreecommitdiff
path: root/docs/manpages/smbtar.1.xml
blob: f7d45d6b814d599d7618eaa3f4edc205e90ca986 (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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
				  
<!ENTITY % globalentities SYSTEM '../entities/global.entities'> %globalentities;
]>
<refentry id="smbtar.1">

<refmeta>
	<refentrytitle>smbtar</refentrytitle>
	<manvolnum>1</manvolnum>
</refmeta>


<refnamediv>
	<refname>smbtar</refname>
	<refpurpose>shell script for backing up SMB/CIFS shares 
	directly to UNIX tape drives</refpurpose>
</refnamediv>

<refsynopsisdiv>
	<cmdsynopsis>
		<command>smbtar</command>
		<arg choice="opt">-r</arg>
		<arg choice="opt">-i</arg>
		<arg choice="opt">-a</arg>
		<arg choice="opt">-v</arg>
		<arg choice="req">-s server</arg>
		<arg choice="opt">-p password</arg>
		<arg choice="opt">-x services</arg>
		<arg choice="opt">-X</arg>
		<arg choice="opt">-N filename</arg>
		<arg choice="opt">-b blocksize</arg>
		<arg choice="opt">-d directory</arg>
		<arg choice="opt">-l loglevel</arg>
		<arg choice="opt">-u user</arg>
		<arg choice="opt">-t tape</arg>
		<arg choice="req">filenames</arg>
	</cmdsynopsis>
</refsynopsisdiv>

<refsect1>
	<title>DESCRIPTION</title>

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

	<para><command>smbtar</command> is a very small shell script on top 
	of <citerefentry><refentrytitle>smbclient</refentrytitle><manvolnum>1</manvolnum>
	</citerefentry> which dumps SMB shares directly to tape.</para>
</refsect1>

<refsect1>
	<title>OPTIONS</title>

	<variablelist>
		<varlistentry>
		<term>-s server</term>
		<listitem><para>The SMB/CIFS server that the share resides 
		upon.</para></listitem>
		</varlistentry>


		<varlistentry>
		<term>-x service</term>
		<listitem><para>The share name on the server to connect to. 
		The default is "backup".</para></listitem>
		</varlistentry>
		
		
		<varlistentry>
		<term>-X</term>
		<listitem><para>Exclude mode. Exclude filenames... from tar 
		create or restore. </para></listitem>
		</varlistentry>



		<varlistentry>
		<term>-d directory</term>
		<listitem><para>Change to initial <parameter>directory
		</parameter> before restoring / backing up files. </para></listitem>
		</varlistentry>



		<varlistentry>
		<term>-v</term>
		<listitem><para>Verbose mode.</para></listitem>
		</varlistentry>



		<varlistentry>
		<term>-p password</term>
		<listitem><para>The password to use to access a share. 
		Default: none </para></listitem>
		</varlistentry>


		<varlistentry>
		<term>-u user</term>
		<listitem><para>The user id to connect as. Default: 
		UNIX login name. </para></listitem>
		</varlistentry>


		<varlistentry>
		<term>-a</term>
		<listitem><para>Reset DOS archive bit mode to 
		indicate file has been archived. </para></listitem>
		</varlistentry>

		<varlistentry>
		<term>-t tape</term>
		<listitem><para>Tape device. May be regular file or tape 
		device. Default: <parameter>$TAPE</parameter> environmental 
		variable; if not set, a file called <filename>tar.out
		</filename>. </para></listitem>
		</varlistentry>


		<varlistentry>
		<term>-b blocksize</term>
		<listitem><para>Blocking factor. Defaults to 20. See
		<command>tar(1)</command> for a fuller explanation. </para></listitem>
		</varlistentry>


		<varlistentry>
		<term>-N filename</term>
		<listitem><para>Backup only files newer than filename. Could 
		be used (for example) on a log file to implement incremental
		backups. </para></listitem>
		</varlistentry>


		<varlistentry>
		<term>-i</term>
		<listitem><para>Incremental mode; tar files are only backed 
		up if they have the archive bit set. The archive bit is reset 
		after each file is read. </para></listitem>
		</varlistentry>


		<varlistentry>
		<term>-r</term>
		<listitem><para>Restore. Files are restored to the share 
		from the tar file. </para></listitem>
		</varlistentry>



		<varlistentry>
		<term>-l log level</term>
		<listitem><para>Log (debug) level. Corresponds to the 
		<parameter>-d</parameter> flag of <citerefentry>
		<refentrytitle>smbclient</refentrytitle><manvolnum>1</manvolnum>
		</citerefentry>.</para></listitem>
		</varlistentry>
	</variablelist>
</refsect1>


<refsect1>
	<title>ENVIRONMENT VARIABLES</title>

	<para>The <parameter>$TAPE</parameter> variable specifies the 
	default tape device to write to. May be overridden
	with the -t option. </para>
</refsect1>


<refsect1>
	<title>BUGS</title>

	<para>The <command>smbtar</command> script has different 
	options from ordinary tar and from smbclient's tar command. </para>

</refsect1>

<refsect1>
	<title>CAVEATS</title>

	<para>Sites that are more careful about security may not like 
	the way the script handles PC passwords. Backup and restore work 
	on entire shares; should work on file lists. smbtar works best
	with GNU tar and may not work well with other versions. </para>
</refsect1>


<refsect1>
	<title>DIAGNOSTICS</title>

	<para>See the <emphasis>DIAGNOSTICS</emphasis> section for the <citerefentry>
	<refentrytitle>smbclient</refentrytitle><manvolnum>1</manvolnum>
	</citerefentry> command.</para>
</refsect1>


<refsect1>
	<title>VERSION</title>

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

<refsect1>
	<title>SEE ALSO</title>
	<para><citerefentry><refentrytitle>smbd</refentrytitle>
	<manvolnum>8</manvolnum></citerefentry>, <citerefentry>
	<refentrytitle>smbclient</refentrytitle><manvolnum>1</manvolnum>
	</citerefentry>, <citerefentry><refentrytitle>smb.conf</refentrytitle>
	<manvolnum>5</manvolnum></citerefentry>.</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>
	
<para><ulink noescape="1" url="mailto:poultenr@logica.co.uk">Ricky Poulten</ulink>  
	wrote the tar extension and this man page. The <command>smbtar</command> 
	script was heavily rewritten and improved by <ulink noescape="1"
	url="mailto:Martin.Kraemer@mch.sni.de">Martin Kraemer</ulink>. Many 
	thanks to everyone who suggested extensions, improvements, bug 
	fixes, etc. The man page sources were converted to YODL format (another 
	excellent piece of Open Source software, available at <ulink noescape="1" url="ftp://ftp.icce.rug.nl/pub/unix/">
	ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0 
	release by Jeremy Allison.  The conversion to DocBook for 
	Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2 for
	Samba 3.0 was done by Alexander Bokovoy.</para>
</refsect1>

</refentry>