SMBTAR(1)
π SMBTAR(1) π
okay bestie, sit DOWN, because this is smbtar from the User Commands section of the manual (section 1, for the record), and it's lowkey one of the most iconic little gremlins in the whole Samba family π
β¨ NAME β¨
smbtar β shell script for backing up SMB/CIFS shares directly to UNIX tape drives
π SYNOPSIS π
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}
π¦ DESCRIPTION π¦
This tool is part of the samba(7) suite. Periodt. π
smbtar is a very small shell script sitting on top of smbclient(1), and what it does is dump SMB shares directly to tape. Like, no middleman, no drama, straight to the tape. She's tiny but she's doing the MOST. π
π OPTIONS π
-s serverβ the SMB/CIFS server that the share lives on. You gotta tell her where to go, bestie, she's not psychic. πΊοΈ-x serviceβ the share name on the server to connect to. The default is"backup". (yes, with the quotes, she's fancy like that)-Xβ exclude mode, babes. Excludesfilenames...from the tar create or restore. Not me being like "no thanks to those files specifically" π-d directoryβ change to an initial directory before restoring / backing up files. A lil "cd first, ask questions later" moment. πͺ-vβ verbose mode. She will yap. And honestly? Let her. π£οΈ-p passwordβ the password to use to access a share. Default:none. (and yes the caveats below have OPINIONS about this, keep reading π)-u userβ the user id to connect as. Default: the UNIX login name. Slay, you're already logged in. π-aβ reset DOS archive bit mode, to indicate the file has been archived. Little bookkeeping queen. β-t tapeβ tape device. May be a regular file or a tape device. Default: the$TAPEenvironmental variable; if that's not set, a file calledtar.out. ποΈ-b blocksizeβ blocking factor. Defaults to20. Seetar(1)for a fuller explanation, because she is NOT re-explaining that whole thing here. π-N filenameβ backup only files newer than filename. Could be used (for example) on a log file to implement incremental backups. Iconic little time-travel trick. β°-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. So she checks, she grabs, she resets. Main character energy. π₯-rβ restore. Files are restored to the share from the tar file. The un-backup. The remix. π-l log levelβ log (debug) level. Corresponds to the-dflag ofsmbclient(1). Turn the volume up or down on the debugging, your call. ποΈ
πΈ ENVIRONMENT VARIABLES πΈ
The $TAPE variable specifies the default tape device to write to. May be overridden with the -t option. So $TAPE is like the default fit, and -t is the outfit change. π
π BUGS π
The smbtar script has different options from ordinary tar and from smbclient's tar command. So like... do NOT assume she works like her cousins, she is her own girl and her flags are her own flags. Not me accidentally typing tar flags into this and getting humbled. π
β οΈ CAVEATS β οΈ
Sites that are more careful about security may not like the way the script handles PC passwords. Bestie. Listen to me. This is a real one.
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. So if you're out here with a non-GNU tar, temper your expectations, fr fr. π«Ά
π DIAGNOSTICS π
See the DIAGNOSTICS section for the smbclient(1) command. She's not repeating herself, go read the girl's page. π
β VERSION β
This man page is part of version 4.24.7 of the Samba suite. π
π SEE ALSO π
π§ AUTHOR π§
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. A whole community, a whole vibe. π
Ricky Poulten wrote the tar extension and this man page. The smbtar script was heavily rewritten and improved by Martin Kraemer. 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 ftp://ftp.icce.rug.nl/pub/unix/) 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.
and that's the whole page, bestie!! this was Samba4.24.7, dated09/09/2026, and she was compiled and formatted by the Samba Team for your reading pleasure. go back up your share and stay hydrated πβ¨ππ¦πΈπ π«Ά
π¦ where this page comes from
- fedora 44: samba-client 2:4.24.7-1.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms