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="smbtar.1">
6 <refentrytitle>smbtar</refentrytitle>
7 <manvolnum>1</manvolnum>
8 <refmiscinfo class="source">Samba</refmiscinfo>
9 <refmiscinfo class="manual">User Commands</refmiscinfo>
10 <refmiscinfo class="version">3.6</refmiscinfo>
15 <refname>smbtar</refname>
16 <refpurpose>shell script for backing up SMB/CIFS shares
17 directly to UNIX tape drives</refpurpose>
22 <command>smbtar</command>
23 <arg choice="opt">-r</arg>
24 <arg choice="opt">-i</arg>
25 <arg choice="opt">-a</arg>
26 <arg choice="opt">-v</arg>
27 <arg choice="req">-s server</arg>
28 <arg choice="opt">-p password</arg>
29 <arg choice="opt">-x services</arg>
30 <arg choice="opt">-X</arg>
31 <arg choice="opt">-N filename</arg>
32 <arg choice="opt">-b blocksize</arg>
33 <arg choice="opt">-d directory</arg>
34 <arg choice="opt">-l loglevel</arg>
35 <arg choice="opt">-u user</arg>
36 <arg choice="opt">-t tape</arg>
37 <arg choice="req">filenames</arg>
42 <title>DESCRIPTION</title>
44 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
45 <manvolnum>7</manvolnum></citerefentry> suite.</para>
47 <para><command>smbtar</command> is a very small shell script on top
48 of <citerefentry><refentrytitle>smbclient</refentrytitle><manvolnum>1</manvolnum>
49 </citerefentry> which dumps SMB shares directly to tape.</para>
53 <title>OPTIONS</title>
57 <term>-s server</term>
58 <listitem><para>The SMB/CIFS server that the share resides
59 upon.</para></listitem>
64 <term>-x service</term>
65 <listitem><para>The share name on the server to connect to.
66 The default is "backup".</para></listitem>
72 <listitem><para>Exclude mode. Exclude filenames... from tar
73 create or restore. </para></listitem>
79 <term>-d directory</term>
80 <listitem><para>Change to initial <parameter>directory
81 </parameter> before restoring / backing up files. </para></listitem>
88 <listitem><para>Verbose mode.</para></listitem>
94 <term>-p password</term>
95 <listitem><para>The password to use to access a share.
96 Default: none </para></listitem>
102 <listitem><para>The user id to connect as. Default:
103 UNIX login name. </para></listitem>
109 <listitem><para>Reset DOS archive bit mode to
110 indicate file has been archived. </para></listitem>
115 <listitem><para>Tape device. May be regular file or tape
116 device. Default: <parameter>$TAPE</parameter> environmental
117 variable; if not set, a file called <filename>tar.out
118 </filename>. </para></listitem>
123 <term>-b blocksize</term>
124 <listitem><para>Blocking factor. Defaults to 20. See
125 <command>tar(1)</command> for a fuller explanation. </para></listitem>
130 <term>-N filename</term>
131 <listitem><para>Backup only files newer than filename. Could
132 be used (for example) on a log file to implement incremental
133 backups. </para></listitem>
139 <listitem><para>Incremental mode; tar files are only backed
140 up if they have the archive bit set. The archive bit is reset
141 after each file is read. </para></listitem>
147 <listitem><para>Restore. Files are restored to the share
148 from the tar file. </para></listitem>
154 <term>-l log level</term>
155 <listitem><para>Log (debug) level. Corresponds to the
156 <parameter>-d</parameter> flag of <citerefentry>
157 <refentrytitle>smbclient</refentrytitle><manvolnum>1</manvolnum>
158 </citerefentry>.</para></listitem>
165 <title>ENVIRONMENT VARIABLES</title>
167 <para>The <parameter>$TAPE</parameter> variable specifies the
168 default tape device to write to. May be overridden
169 with the -t option. </para>
176 <para>The <command>smbtar</command> script has different
177 options from ordinary tar and from smbclient's tar command. </para>
182 <title>CAVEATS</title>
184 <para>Sites that are more careful about security may not like
185 the way the script handles PC passwords. Backup and restore work
186 on entire shares; should work on file lists. smbtar works best
187 with GNU tar and may not work well with other versions. </para>
192 <title>DIAGNOSTICS</title>
194 <para>See the <emphasis>DIAGNOSTICS</emphasis> section for the <citerefentry>
195 <refentrytitle>smbclient</refentrytitle><manvolnum>1</manvolnum>
196 </citerefentry> command.</para>
201 <title>VERSION</title>
203 <para>This man page is correct for version 3 of
204 the Samba suite.</para>
208 <title>SEE ALSO</title>
209 <para><citerefentry><refentrytitle>smbd</refentrytitle>
210 <manvolnum>8</manvolnum></citerefentry>, <citerefentry>
211 <refentrytitle>smbclient</refentrytitle><manvolnum>1</manvolnum>
212 </citerefentry>, <citerefentry><refentrytitle>smb.conf</refentrytitle>
213 <manvolnum>5</manvolnum></citerefentry>.</para>
217 <title>AUTHOR</title>
219 <para>The original Samba software and related utilities
220 were created by Andrew Tridgell. Samba is now developed
221 by the Samba Team as an Open Source project similar
222 to the way the Linux kernel is developed.</para>
224 <para><ulink noescape="1" url="mailto:poultenr@logica.co.uk">Ricky Poulten</ulink>
225 wrote the tar extension and this man page. The <command>smbtar</command>
226 script was heavily rewritten and improved by <ulink noescape="1"
227 url="mailto:Martin.Kraemer@mch.sni.de">Martin Kraemer</ulink>. Many
228 thanks to everyone who suggested extensions, improvements, bug
229 fixes, etc. The man page sources were converted to YODL format (another
230 excellent piece of Open Source software, available at <ulink noescape="1" url="ftp://ftp.icce.rug.nl/pub/unix/">
231 ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0
232 release by Jeremy Allison. The conversion to DocBook for
233 Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2 for
234 Samba 3.0 was done by Alexander Bokovoy.</para>