Monday 19 December 2016

Rewind tape drive in SCO UNIX



Rewind tape drive with SCO:

# mt -f /dev/st0 rewindBackup directory /www and /home with tar command (z - compressed):

# tar -czf /dev/st0 /www /homeFind out what block you are at with mt command:

# mt -f /dev/st0 tellDisplay list of files on tape drive:# tar -tzf /dev/st0Restore /www directory:

# cd /

# mt -f /dev/st0 rewind

# tar -xzf /dev/st0 wwwUnload the tape:
# mt -f /dev/st0 offlineDisplay status information about the tape unit:

# mt -f /dev/st0 status Erase the tape:# mt -f /dev/st0 eraseYou can go BACKWARD or FORWARD on tape with mt command itself:

(a)   Go to end of data:# mt -f /dev/nst0 eod
(b)   Goto previous record:

# mt -f /dev/nst0 bsfm 1(c) Forward record:# mt -f /dev/nst0 fsf 1 Replace /dev/st0 with your actual tape drive name.




Linux Tape Backup Example

To backup to multiple tape use the following command (backup /home file system):

# tar -clpMzvf /dev/st0 /home


To compare tape backup, enter:

# tar -dlpMzvf /dev/st0 /home


To restore tape in case of data loss or hard disk failure:

# tar -xlpMzvf /dev/st0 /home


Where,


d : find differences between archive and file system
x : extract files from an archive
l : list the contents of an archive
p : ignore umask when extracting files
M : create/list/extract multi-volume archive (multiple tapes)
z : Compress backup using gzip
v : verbosely list files processed
f /dev/st0 : Tape device name
/home : Backup /home file system
Putting it all tougher


1 comment:

  1. Great Post with valuable information. I am glad that I have visited this site. Share more updates.
    UNIX Online Training
    Online Courses for Content Writing
    Seo Course Online


    ReplyDelete