Samba restores don't work ...

2001-03-20 Thread Tony Ross

Greetings;

Backups are working great across a network of 16 different UNIX variants, and several 
NT servers. My problem is restoring to the NT servers.

We are using Amanda 2.4.2p1, Samba 2.07 and gtar 1.13 on a Solaris 2.6 box.

The Samba shares are accessible to the user "backup" who has "Full Control" on all 
directories and files within the share.

>From Daily/disklist:

sun26 //nt4/StarTeamVault  windows-samba

>From amanda.conf:

define dumptype global {
index yes
}
define dumptype windows-samba {
global
program "GNUTAR"
comment "Critical Windows shares"
options no-compress 
priority high
}


>From /etc/amandapass:

//nt4/StarTeamVault backup
ckup

"Backups proceed uneventfully. Restoring using "setmode tar, works as expected, so the 
tape is certainly readable. The following is a transcript of amrecover using Samba: 
with the correct tape in the drive

#
>amrecover/ setdisk //nt4
StarTeamVault
.../200 Disk set to //nt4
StarTeamVault.
>amrecover
 cd Java///nt4/StarTeamVault
Java
>amrecover
 add Server-16-Feb-01-12-46-32.Log/Added /Java
Server-16-Feb-01-12-46-32.Log
>amrecover
 setmode smb
SAMBA dumps will be extracted using smbclient
>amrecover
 extract
/Extracting files using tape drive /dev
autodrive_norewind on host sun26.:The following tapes are needed
 Daily01
/Restoring files into directory /tmp
amanda(,unless it is a Samba backup) that will go through to the SMB server
?Continue[ /Y]n:
 y

Load tape Daily01 now?Continue[ /Y]n:
 y
>amrecover
 quit#


:From amidxtaped.debug


...:amrestore:   7
 restoring sun26.__nt4_StarTeamVault.20010319.0(Error 32 )Broken pipe+ offset 0,32768
 wrote 0:amrestore
 pipe reader has quit in middle of file.:amrestore, skipping ahead to start of next 
file
 please wait...:amidxtaped: amrestore terminated normally with status
 2:Rewinding tape
 done:amidxtaped: pid 8305 finish time Tue Mar 20 19:11
09 2001


:From amrecover.debug


..."Started amidxtaped with arguments /6 -h -p /dev^autodrive_norewind sun26 
///nt4$StarTeamVault" 20010319
'Exec/ing /usr/local/samba/bin:smbclient with arguments

smbclient///nt4
StarTeamVault
X -U %backup
backup
-d0
-Tx
-/./Java
Server-16-Feb-01-12-46-32.Log:amrecover: pid 7587 finish time Tue Mar 20 19:11
22 2001
:From amindexd.debug


...
 TAPE
 QUIT:Removing index file/ 
/usr/local/etc/amanda/Daily/info/index/sun26/__nt4_StarTeamVault
20010319_0<
 200 Good bye.:amindexd: pid 7588 finish time Tue Mar 20 19:11
22 2001
##


The file is not restored to the NT server as is needed.

I will Thank You very much in advance for any help or insight into this problem.


tony%0A


Re: Samba restores don't work ...

2001-03-20 Thread John R. Jackson

>Backups are working great across a network of 16 different UNIX variants, a=
>nd several NT servers. My problem is restoring to the NT servers.

It was very difficult to read your E-mail because of the quoting, so I
can't give you exact things to try, but here's where I would start.

Go to amrecover.debug and look at the smbclient command.  What happens
if you do something like this on the (sun26) client:

  rsh  mt -f /dev/autodrive_norewind rewind
  rsh  amrestore -hp /dev/autodrive_norewind \
sun26 //nt4/StarTeamVault | \
smbclient 

In particular, does smbclient whine about anything?  What if you change
-d0 to -d1 (or -d2, etc) on smbclient?  You should see more debugging
information.

>tony

John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]



Re: Samba restores don't work ...

2001-03-21 Thread Tony Ross


 On 3/20/01, 8:20:12 PM, "John R. Jackson" <[EMAIL PROTECTED]>
 wrote regarding Re: Samba restores don't work ... :

...
 > Go to amrecover.debug and look at the smbclient command.  What 
happens
 > if you do something like this on the (sun26) client:

 >   rsh  mt -f /dev/autodrive_norewind rewind
 >   rsh  amrestore -hp /dev/autodrive_norewind \
 > sun26 //nt4/StarTeamVault | \
 > smbclient 

 > In particular, does smbclient whine about anything?  What if you 
change
 > -d0 to -d1 (or -d2, etc) on smbclient?  You should see more debugging
 > information.
...

Using -d3 we have:

# amrestore -ph /dev/autodrive_norewind sun26 "^//nt4/StarTeamVault$" 
20010320 | smbclient //nt4/StarTeamVault X -U backup%backup -d3 
-Tx - ./Java/Server-16-Feb-01-12-46-32-ORG.Log
Client started (version 2.0.7).
resolve_lmhosts: Attempting lmhosts lookup for name nt4<0x20>
resolve_hosts: Attempting host lookup for name nt4<0x20>
Connecting to www.xxx.yyy.zzz at port 139
Domain=[MASTER] OS=[Windows NT 4.0] Server=[NT LAN Manager 4.0]
tree connect failed: ERRDOS - 71
amrestore:   0: skipping start of tape: date 20010320 label Daily02
...
amrestore: write error: Broken pipe


On a different NT machine:

# amrestore -ph /dev/autodrive_norewind sun26 "^//nt5b/GoldMine$" 
20010319 | smbclient //nt5b/GoldMine X -U backup%backup -d3 -Tx - 
./SOMEBODY.ini
Client started (version 2.0.7).
resolve_lmhosts: Attempting lmhosts lookup for name nt5b<0x20>
resolve_hosts: Attempting host lookup for name nt5b<0x20>
Connecting to www.xxx.yyy.zzz at port 139
Domain=[MASTER] OS=[Windows NT 4.0] Server=[NT LAN Manager 4.0]
amrestore:   0: skipping start of tape: date 20010319 label Daily01
...
checksums don't match 0 17852
abandoning restore, -1 from read tar header
amrestore: write error: Broken pipe



It's odd that with Full Control on the shares, the backup user can 
read them all but has troubles when restoring.

Thanks,

tony






Re: Samba restores don't work ...

2001-03-21 Thread John R. Jackson

>Using -d3 we have:
>
># amrestore -ph /dev/autodrive_norewind ...

Sorry.  I should have been clearer.  I only meant for you to take
the smbclient command from the file, not the amrestore command.
In particular, the -h flag also sent the Amanda header out to
smbclient (normally, amrecover peels that off), which made the image
incomprehensible.  That's why the second attempt (nt5b) failed with the
checksum error.

I have no idea why nt4 is failing, although the obvious answer is that
something is different about that share, which I'm afraid I can't help
much with.  You'll just have to stare at it very, very closely, I guess.

The simpler thing to try next would be just a normal smbclient connection
to that share (as user "backup") and see if you can do easy things.

>   tony

John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]