Search the Knowledge Base:

 

How do I use the Linux tar command to backup using my tape drive, autoloader or library?
(KB # 59C7C9B2)

Set variable block mode:

system# mt -f /dev/st0 setblk 0

Following are examples of Backup and Restore commands for Tar at command prompt.

Procedure
Tar
Backup system# mt -f /dev/st0 setblk 0
system# tar -c -v -b 128 -f /dev/st0 filename
Restore system# cd
system# tar -x -v -b 128 -f /dev/st0

Explanation of commands:

Backup Commands
c = Create
v = Verbose
-b 128 = sets blocking factor to 128
512 blocks x 128 = 64k
-f = specifies tape archive
/dev/st0 = specifies tape device
filename = specifies file or directory to backup
Additional Restore Commands
x = extract

 



Rate this

Send Feedback

Send Us Feedback

Questions, comments, suggestions? Use our
feedback form and let us know what you think.

Feedback Form