[Samba] Re: How to share the tape drive in samba server

Dragan Krnic dkrnic at lycos.com
Thu Jun 19 19:37:24 GMT 2003

>> If you're looking to share the tape drive so you 
>You could probably do something clever with a magic 
>script in the Samba config, but it still wouldn't 
>work with native Windows backup utilities. (Are 
>there native Windows backup utilities that can 
>access a remote tape drive?) You could probably get 
>it to work with tar under Cygwin if you tried hard 
>enough. But if Cygwin's tar doesn't have remote-tape 
>access disabled, you'd be better off using that
>instead--it's much lower overhead.

Theoretically you could pipe cygwin tar through
rexec but it's really not a good solution. Network
connections are seldom fast enough to maintain
streaming operation. I get about 37 MB/s between my
Samba server and its standby via cross-connected
r8169's but W2K clients rarely feed more than about
4-5 MB/s via fast LAN, so that would ruin the tape 
drive mechanics pretty fast.

Cygwin tar can't dump files > 8GB, it only dumps the
modulo quantity. Therefor smbtar is more advisable:
it logs modulo size but dumps the whole file. The
bug is reported in sambzilla and waiting for me to
find the time to fix it for good.

Plus with smbtar you can centralize the backup 
activity. I'm backing up 12 administrative shares
and a samba server on a daily basis with smbtar
and tar. It is staged on a striped lvol of four
IDE disks (240 GB total capacity). Once a month
on a different day each share gets a full backup.
For the rest of the month only -N files are tarred.

Since a full day's worth of backups lands in an 
online volume first, a program can inspect the
individual tars, fix the 8 GB bug if present, and
produce a TOC file which gets saved on the tape ahead
of individual tars as well as in an online admin dir. 
Compressed TOCs average only about 2 MB/day whereas 
the incrementation gets me about 10 days' worth of 
tarrings on a single LTO2 cartridge except on the 1st 
tape of each month which contains fullvol tar of samba 
server (cca.150 GB) - only 6 more days can fit before 
the tape gets full. The fancy thing is that you can 
look for an MIA file in on-line TOC copies as well as 
directly from tape in an ncurses file browser like 
this (you need a monofont to see it properly):

|  Size in KBs  Dirs           Size(KB)  Paths    |
|------------- --------------- -------- ----------|
|       95,064 /p01.c         ||      0  lmhosts  |
|    4,531,101 /p01.d         ||      2  smb.conf |
|      479,649 /p02.c         ||===> 15 *smbpasswd|
|    2,514,664 /p07.c         |                   |
|    9,939,474 /p12.c         |                   |
|            4 /p13.c         |                   |
|           76 /p17.c         |                   |
|      831,730 /p17.d         |                   |
|    1,907,112 /p18.c         |                   |
|    1,609,472 /p18.e         |                   |
|    2,196,652 /p25.e         |                   |
|      338,194 /p27.c         |                   |
|   26,337,297 /p90.slash     |                   |
|          357 | /data2       |                   |
|            0 | /dev         |                   |
|           88 | /etc         |                   |
|            0 | | /cups      |                   |
|---------> 17 | | /samba <===|                   |
|   24,823,606 | /local       |                   |
|                                                 |
|select: ?help  Restore  Quit                     |

Selecting a file for restore (like smbpasswd above)
and pressing (R)estore retrieves the file in about
a minute and a half worst case.

I probably re-invented the wheel, because I was too 
lazy to rtfm for any oss, but I have Full Control
over it. So next thing I'll reduce the daily 
increments by about an order of magnitude. Each day 
will only increment on the previous day and a slightly
improved browser will use the TOCs as a kind of
multiversioning repository database in which one
can browse by dates and bore up and down to multiple
versions of a wiggling file. I'll also try remotely
spawned ntbackup, the native WinDoze tool, on the
wild chance that it may carry along all other 
attributes not recognized by smbtar, you know
streams and stuff. Does anyone have a good CLI for

Sorry I got carried away by this fascinating subject.
Ah yes, remote tape shares. It's a concept not worth
pursuing because of shortcomings already elucidated
by preposters, but also counterproductive in terms of
low speed yield and potentially contentious chaos.

> A quick search reveals this software to look at: 
> NovaNet (www.network-backup.com), Arkeia 
> (www.arkeia.com), NetVault Workgroup Edition 
> (www.bakbone.com), (Veritas BackupExec not
> available for Linux,) anyone know of open-source, 
> multi-platform network-aware backup software?

Errm, what I described above was just the last
Wintel/Lintel tar branch of a network-aware backup
for Veritas's vxfs on HP-UX, Sun and Linux. I'm
considering gpl, if it's really worth the effort
and not too embarassing to publically show all
those gotos and comefroms.

>There's always Amanda (http://www.amanda.org/). It 
>can back up Windows clients in one of several ways.  
>The three obvious ones are:
>1: build the Amanda client software under Cygwin.
>2: use Amanda's smbclient interface as described in 
>3: smbmount (or other network filesystem) the Windows 
>There's been some effort to create a native Windows 
>Amanda client, but I don't think it's completed or 
>usable yet.

How is native Windows Amanda client different from 1:
above? I must be missing something.

Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!

More information about the samba mailing list