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

how to use tar?

Status
Not open for further replies.

kmsam2

Programmer
May 21, 2003
29
MY
I'm new to unix and I need to perform backup, may I know what is the different for following:

/dev/rmt/0mb
/dev/rmt/0m
/dev/rmt/0c

may I know which is recommended?


Sam.
 
Hi Sam and welcome. The above are the logical tape devices which can be used to make your backup. Basically, the 0 indicates the first (or default) drive, the m indicates medium density and the c indicates that the drive will operate in compressed mode. If you include an n (say as in /dev/rmt/0cn (which we usually use), the drive will be operated in compressed and 'no-rewind' mode so that the tape is not rewound at the end of the save. There is good info. on this and other topics here:


If you think we can help you further, let us know.

All I ask of you
Is make my wildest dreams come true
 
l,m,h,c is the tape density
Low,medium,high,compressed
It is different for each kind of tape.
c is used most often.

b = BSD behavior (not sure what that means)

n= no rewind
 
Millions thanks to 2 of you. I will try it today.
Should I use tar or ufsdump for backup? May I know what is the different?

Sam.
 
We use ufsdump, but tar is probably more transportable between platforms if that is a requirement. What are you backing up?

All I ask of you
Is make my wildest dreams come true
 
I need to do monthly full system backup.

Sam.
 
Then I would suggest ufsdump, personally, but other people have other preferences - flarcreate for example, though I've never used it. In my experience it is more difficult to do a 'bare metal' restore in Solaris than it is in, say, AIX which has the mksysb command for just such an eventuality.

All I ask of you
Is make my wildest dreams come true
 
there are some many name in /dev/rmt/, how do i know which one I can use? I mean valid tape drive device.

Sam.
 
Put a tape in your drive and type (in the first place):

mt -f /dev/rmt/0 rewoff

If this successfully unloads the tape, you're good to go with /dev/rmt/0, dev/rmt/0cn ...etc. If it doesn't work, try /dev/rmt/1 etc until you get one that responds.

All I ask of you
Is make my wildest dreams come true
 
Thanks again.

Can above command work for 0hn or 0m?
what is the meaning of 0mb?

Sam.
 
Yes the command should work for whatever combination, as long as it's 'legal' ie doesn't contain two densities for example (eg 0mh). 0mb is the 0 device, medium density, BSD emulation, the latter being mainly used for backward compatibility with older systems. Certainly I've never used the b option, but I guess it has it's place.

All I ask of you
Is make my wildest dreams come true
 
Should I format/erase tape before performing full system backup?
If yes, may I have the command?

Sam.
 
Formatting's not required and I've never erased a tape either - overwriting does the trick to all intents and purposes unless you're in a very security paranoid environment (and as far as I know an erase takes an inordinately long time).

All I ask of you
Is make my wildest dreams come true
 
>> Should I use tar or ufsdump for backup? May I know what is the different?

>> I need to do monthly full system backup.

I suggest to run these Backups with ufsdump, since you can have different levels of backup very easily. You run a 0 Level Backup the first week, a level 4 backup by the next week, a level 3 backup in the 3rd week and a level 2 backup in week #4, if there is a month with 5 weeks you can even run a level 1 backup. The big advantage of level backups is, you habe incremental backups (instead if lasting-very-long fullbackups) with less system downtime.

BTW: if you are responsible for the backups and you(r company) decides not to use any backup product. You should have some metainfo about the contents of the tapes and backup time.
One of my former colleagues used to say: The best backup concept is nothing until it is proofed, that a restore works. So, try out to restore more than a single /etc/passwd file. You will get infos about how long does a restore take. Usually companies run through the worst case scenario: how long does a full restore last?

Best Regards, Franz
--
UNIX System Manager from Munich, Germany
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top