smbtar1
Shell script for backing up smb/cifs shares directly to unix tape drives
Usage
smbtar [-r]
[-i]
[-a]
[-v]
-s
server
[-p
password]
[-x
services]
[-X]
[-N
filename]
[-b
blocksize]
[-d
directory]
[-l
loglevel]
[-u
user]
[-t
tape]
filenames
Overview
This tool is part of the samba(7) suite.
smbtar is a very small shell script on top of smbclient(1) which dumps SMB shares directly to tape.
Options
-
-s server -
The SMB/CIFS server that the share resides upon.
-
-x service -
The share name on the server to connect to. The default is "backup".
-
-X -
Exclude mode. Exclude filenames... from tar create or restore.
-
-d directory -
Change to initial directory before restoring / backing up files.
-
-v -
Verbose mode.
-
-p password -
The password to use to access a share. Default: none
-
-u user -
The user id to connect as. Default: UNIX login name.
-
-a -
Reset DOS archive bit mode to indicate file has been archived.
-
-t tape -
Tape device. May be regular file or tape device. Default: $TAPE environmental variable; if not set, a file called tar.out.
-
-b blocksize -
Blocking factor. Defaults to 20. See tar(1) for a fuller explanation.
-
-N filename -
Backup only files newer than filename. Could be used (for example) on a log file to implement incremental backups.
-
-i -
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.
-
-r -
Restore. Files are restored to the share from the tar file.
-l log level
Log (debug) level. Corresponds to the -d flag of smbclient(1).
Environment
The $TAPE variable specifies the default tape device to write to. May be overridden with the -t option.
Caveats
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.
Diagnostics
See the DIAGNOSTICS section for the smbclient(1) command.
Version
This man page is part of version 4.25.1 of the Samba suite.
Releases
19 releases since Debian 1.1 (Buzz); the text changed 18 times.
-N since Debian 7 (Wheezy);
-X since Debian 7 (Wheezy);
-a since Debian 7 (Wheezy);
-b since Debian 7 (Wheezy);
-d since Debian 7 (Wheezy);
-i since Debian 7 (Wheezy);
-p since Debian 7 (Wheezy);
-r since Debian 7 (Wheezy);
-s since Debian 7 (Wheezy);
-t since Debian 7 (Wheezy);
-u since Debian 7 (Wheezy);
-v since Debian 7 (Wheezy);
-x since Debian 7 (Wheezy).
-l until Debian 1.1 (Buzz);
-n until Debian 1.1 (Buzz).