This site has been destroyed by Google forced upgrade to new way of WEB site.
All files links are not working. Many images has been lost in conversation.
Have to edit 190 pages manually. Will try to do ASAP but for this I need time ...
THANK YOU GOOGLE !

Monday, June 21, 2010

Linux tape commands (DBA summary)

Every DBA sooner or later will have a chance to work with tape drives. For that Linux has several commands.

Because I always search Internet for some command, this post is made just to be mine backup comprehensive place for all important tape commands in Linux.

Save to tape

1. Rewind
mt -f /dev/nst0 rewind

2. Move to end of last block
mt -f /dev/st0 eod

3. Save and compress content to tape
tar cvf /dev/nst0 ./bg*.gz

4. Rewind
mt -f /dev/nst0 rewind

Take the tape to treasury

Eject tape
mt -f /dev/st0 eject

Restore from tape

1. Rewind
mt -f /dev/nst0 rewind

2. Move to block from which you want to restore (0,1,2,3 etc.- number of block)
mt -f /dev/nst0 fsf 1 
"1" is second block, because it starts from 0.

3. Restore from tape to current directory
tar xvf /dev/nst0

The end

Maybe someone find them useful too.

Cheers!

Zagreb u srcu!

Copyright © 2009-2018 Damir Vadas

All rights reserved.


Sign by Danasoft - Get Your Sign