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"> 4 5<refmeta> 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.5</refmiscinfo> 11</refmeta> 12 13 14<refnamediv> 15 <refname>smbtar</refname> 16 <refpurpose>shell script for backing up SMB/CIFS shares 17 directly to UNIX tape drives</refpurpose> 18</refnamediv> 19 20<refsynopsisdiv> 21 <cmdsynopsis> 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> 38 </cmdsynopsis> 39</refsynopsisdiv> 40 41<refsect1> 42 <title>DESCRIPTION</title> 43 44 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle> 45 <manvolnum>7</manvolnum></citerefentry> suite.</para> 46 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> 50</refsect1> 51 52<refsect1> 53 <title>OPTIONS</title> 54 55 <variablelist> 56 <varlistentry> 57 <term>-s server</term> 58 <listitem><para>The SMB/CIFS server that the share resides 59 upon.</para></listitem> 60 </varlistentry> 61 62 63 <varlistentry> 64 <term>-x service</term> 65 <listitem><para>The share name on the server to connect to. 66 The default is "backup".</para></listitem> 67 </varlistentry> 68 69 70 <varlistentry> 71 <term>-X</term> 72 <listitem><para>Exclude mode. Exclude filenames... from tar 73 create or restore. </para></listitem> 74 </varlistentry> 75 76 77 78 <varlistentry> 79 <term>-d directory</term> 80 <listitem><para>Change to initial <parameter>directory 81 </parameter> before restoring / backing up files. </para></listitem> 82 </varlistentry> 83 84 85 86 <varlistentry> 87 <term>-v</term> 88 <listitem><para>Verbose mode.</para></listitem> 89 </varlistentry> 90 91 92 93 <varlistentry> 94 <term>-p password</term> 95 <listitem><para>The password to use to access a share. 96 Default: none </para></listitem> 97 </varlistentry> 98 99 100 <varlistentry> 101 <term>-u user</term> 102 <listitem><para>The user id to connect as. Default: 103 UNIX login name. </para></listitem> 104 </varlistentry> 105 106 107 <varlistentry> 108 <term>-a</term> 109 <listitem><para>Reset DOS archive bit mode to 110 indicate file has been archived. </para></listitem> 111 </varlistentry> 112 113 <varlistentry> 114 <term>-t tape</term> 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> 119 </varlistentry> 120 121 122 <varlistentry> 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> 126 </varlistentry> 127 128 129 <varlistentry> 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> 134 </varlistentry> 135 136 137 <varlistentry> 138 <term>-i</term> 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> 142 </varlistentry> 143 144 145 <varlistentry> 146 <term>-r</term> 147 <listitem><para>Restore. Files are restored to the share 148 from the tar file. </para></listitem> 149 </varlistentry> 150 151 152 153 <varlistentry> 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> 159 </varlistentry> 160 </variablelist> 161</refsect1> 162 163 164<refsect1> 165 <title>ENVIRONMENT VARIABLES</title> 166 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> 170</refsect1> 171 172 173<refsect1> 174 <title>BUGS</title> 175 176 <para>The <command>smbtar</command> script has different 177 options from ordinary tar and from smbclient's tar command. </para> 178 179</refsect1> 180 181<refsect1> 182 <title>CAVEATS</title> 183 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> 188</refsect1> 189 190 191<refsect1> 192 <title>DIAGNOSTICS</title> 193 194 <para>See the <emphasis>DIAGNOSTICS</emphasis> section for the <citerefentry> 195 <refentrytitle>smbclient</refentrytitle><manvolnum>1</manvolnum> 196 </citerefentry> command.</para> 197</refsect1> 198 199 200<refsect1> 201 <title>VERSION</title> 202 203 <para>This man page is correct for version 3 of 204 the Samba suite.</para> 205</refsect1> 206 207<refsect1> 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> 214</refsect1> 215 216<refsect1> 217 <title>AUTHOR</title> 218 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> 223 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> 235</refsect1> 236 237</refentry> 238