Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

samba restore issue

Status
Not open for further replies.

johndrake

Technical User
Jul 25, 2002
97
Hi All,

I've written a samba restore script and I am running into
an issue where only the first file is getting restored. I have
created a perl script to perform the samba restore. Below is the
output that I am receiving when the script is run:

./nu_restore.pl 06Aug02.log jpape NT
Restore will take place momentarily
added interface ip=128.5.16.80 bcast=128.5.255.255 nmask=255.255.0.0
added interface ip=10.140.3.80 bcast=10.255.255.255 nmask=255.0.0.0
Domain=[KNIGHTSBRIDGE] OS=[MAX EUX] Server=[MAX SMB 1.3.0]
restore tar file \jpape\work related\bb\bbrother.txt of size 38105 bytes
tar: restored 1 files and directories
added interface ip=128.5.16.80 bcast=128.5.255.255 nmask=255.255.0.0
added interface ip=10.140.3.80 bcast=10.255.255.255 nmask=255.0.0.0
Domain=[KNIGHTSBRIDGE] OS=[MAX EUX] Server=[MAX SMB 1.3.0]
tar: restored 0 files and directories
added interface ip=128.5.16.80 bcast=128.5.255.255 nmask=255.255.0.0
added interface ip=10.140.3.80 bcast=10.255.255.255 nmask=255.0.0.0
Domain=[KNIGHTSBRIDGE] OS=[MAX EUX] Server=[MAX SMB 1.3.0]
tar: restored 0 files and directories
added interface ip=128.5.16.80 bcast=128.5.255.255 nmask=255.255.0.0
added interface ip=10.140.3.80 bcast=10.255.255.255 nmask=255.0.0.0
Domain=[KNIGHTSBRIDGE] OS=[MAX EUX] Server=[MAX SMB 1.3.0]



Here is the part of the script where I create the file list:

if ($system =~ $nt)
{
if ($nu_line =~ /directory/)
{
; # do nothing
}
else
{
# nt obtain full path and file name
$nu_line = (split(/kb\/s./, $line))[1];

# add header/trailer ticks
$nu_line =~ s/^ /'/; # prepend ' to beginning of file name
$nu_line =~ s/\n/'/; # append ' to end of file
$nu_line = "$nu_line"."\n";

# eliminate blank lines
if ( $nu_line =~ /^'/ )
{
#print "$nu_line";
push(@nt_filz,$nu_line);
}

}
}

Here is the part of the script where the restore is done:

sub NT
{
# fast forward tape drive to NT files
system "tctl -f /dev/rmt1.1 fsf 1";


while (@nt_filz)
{
$file=pop(@nt_filz);
system "$command $host $pwd $var1 $id $var2 $device $file";
#print "$command $host $pwd $var1 $id $var2 $device $file";
}
print "NT restore is complete.\n";

# keep the shell happy
0
}


Could anyone help as to why this is happening?

Thanks!

-Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top