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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mount tape drive 4

Status
Not open for further replies.

int

Technical User
Jan 18, 2001
9
0
0
DE
hi,
i have 4 server (solaris utra 5). but just only have one tape drive and it is connect to one of my server.
i need to make a full backup each of the box.
1. can i mount this tape drive from other server that without this tape, that i can make a ufsdump direktly to this tapedrive.
2. how can i do it ?

any information will be very helpfull for me. thanksss
 
I'm not sure about mounting the tape drive remotely, I've never tried that, but you can backup through the network using a combination of ufsdump, rsh, dd, and an /etc/host.equiv file. You can check the man pages for each of these commands as well as 'man tar' (it has a really decent example).

Hope this helps.

- Stuart
 
thanks alot wongyck, but i am realy new with solaris maschine. i have read already but i dont understand it. Can you please explain it how i should do. it will be very great for me.
 
Hi,

You can use the following command for a remote backup using tar. I used this a long time ago & worked fine.
In fact, this is from the man page. You can find the tar command for extraction also in the same man page.

tar cvfb - 20 files |rsh host dd of=/dev/rmt/0 obs=20b

Sekhar.


 
Here is exactly what you need to do:
1. On the server with the tape drive, you must share this drive to the other servers. Go to the /etc/dfs/dfstab file and enter the following line:
share -F nfs -o rw /path/nameoftapedrive
2. To share it out you must type the command: shareall
note: you must be root to do all this.
3. From the server you want to back up mount the tape drive to a local directory something like this:
mount server1:/path/drivename /mnt
4. back up the server info to that mount point which is your tape drive.
5. unmount the drive


Note: you can also do this in the reverse order by sharing the drives you want to back up to the server that has the tape drive. Then create a mount point to the information you want to back up and do the backup from the server that has the tape drive.

I hope this is helpful. The commands you may have to change the options of depending on what you want it to do.
 
ouch ...


ufsdump <dumplevel>fu <hostwithdrive>:/dev/rmt/<devicenumber>n <directory or sliceyou want to backup>

eg:
ufsdump 2fu super1:/dev/rmt/1n /dev/dsk/c2t1d0s7

on super1 you will need to set up the /etc/hosts.equiv, or add a .rhosts file for the user you are trying to copy as ...

note: .rhosts and hosts.equiv are seen as security bypasses, and so are not really recomended by sun/anyone with security chiefly in mind, but you can always modify them back, and it's safer than sharing the device point ... ick!
 
thanks jad , but kann you tell me how kann i set my rhosts or hosts.equiv files
 
hi gcevicelou, thanks alot for your help.
i have type in my etc/dfs/dfstab file same like you said and at the another solaris box i do also the mount of my tape but everytime it says cannot find or cannot mount this tape. can your help me pls ....
reegards
 
in .rhosts ... :
on the machine with the tape drive add the name of the machine you want to back up from ...

i.e. if 'helen' has the tape drive, and 'sid' and 'ethel' have the data on their hard disks

add :
Code:
sid
ethel

for hosts.equiv it is the same, except you can add a username for rlogging
 
If you are interested in trying the 'mount' alternative suggested, I think you might need to first put a tape in the drive before you can try to actually mount it. This should take care of your error.

This is the command I have used in the past using the 'rsh' option:

find usr -name '*' -print |cpio -ocvC 4000000 |rsh <hostname> dd of=/dev/rmt/0c obs=4000000b

It worked but was too slow, I like Jad's command better :)

Hope this helps.

- Stuart
 
I'm trying the ufsdump method on a couple of my servers, and have encountered a problem. I added the server names to the .rhosts and hosts.equiv files, but when I issue the
ufsdump 0cful remoteserver:/tmp/dump.dat /
I get the error messages:
DUMP: permission denied
DUMP: Cannot connect to tape host `remoteserver'
DUMP: The ENTIRE dump is aborted.
Yet to another remote server, I have no problems. The .rhosts and hosts.equiv are the same.


Any ideas appreciated.
Cheers.
 
Checkout the docs for system admin.For solaris 7 refer admin1 pdf file on page 609.

To copy files to a remote tape drive use the tar and dd commands.
$ tar cf - files | rsh remotehost dd of=/dev/rmt/n obs=blocksize

tar cf Creates a tape archive and specifies the tape device.
- (Hyphen) Represents a placeholder for the tape device.
files Identifies files to be copied.
| rsh remotehost Pipe the tar command’s output to a remote shell to copy the files.
dd of=/dev/rmt/n Represents the output device.
obs=blocksize Represents the blocking factor.

example
# tar cvf - * | rsh mercury dd of=/dev/rmt/0 obs=126b
a answers/ 0 tape blocks
a answers/test129 1 tape blocks
a sc.directives/ 0 tape blocks
a sc.directives/sc.190089 1 tape blocks
a tests/ 0 tape blocks
a tests/test131 1 tape blocks
6+9 records in
0+1 records out
 
Hi int,

Whatever information provided by jad is 100% correct for tape drive sharing and it really works. And NFS will not work for tape drive sharing.

Similar to ufsdump, you can also take backup through tar giving device as machine:devicename.

Also u can specify user. i.e. user@machine:devicename



If the name of the file is of the form
machine:device, the dump is done from the
specified machine over the network using
rmt(1M). Since ufsdump is normally run by
root, the name of the local machine must
appear in the /.rhosts file of the remote
machine. If the file is specified as
user@machine:device, ufsdump will attempt to
execute as the specified user on the remote
machine. The specified user must have a
.rhosts file on the remote machine that
allows the user invoking the command from the
local machine to access the remote machine


-rbm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top