LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-08-2008, 07:19 AM   #1
deadlock
Member
 
Registered: Apr 2003
Distribution: Red Hat
Posts: 65

Rep: Reputation: 15
Check tape dump


A couple of quick questions:

1) How do I confirm that my tape dump has properly completed? At the moment I run the commands:

Code:
>dump -0f /dev/nst0 /boot
>dump -0f /dev/nst0 /
I am assuming that this will backup the complete OS to the tape - correct?

2) How can I make the tape drive on st0 available to another server to do the same backup on it? Would it be easier to mount / on the other server to a share on the first?

Background
Red Hat ES4, Ultrium 960 LTO drive
 
Old 01-08-2008, 07:53 PM   #2
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
It's always good to check backup tapes and confirm that your backup worked. You've used dump and created two dump files on the tape. You can check it using the mt command and the restore command. There is an interactive option (-i) for restore that allows you to look through the contents of the tape and tag files to restore. You can do things like:

Code:
# mt -f /dev/nst0 status
# mt -f /dev/nst0 fsf 1
# restore -if /dev/nst0
and so on to confirm what you have. Check the man pages on dump, restore, and mt.

As far as getting a dump from one machine to the tape drive on another, there was just a discussion of this topic on another thread. It was with reference to Solaris and ufsdump, but the same thing works with linux and dump. Check it out here:

http://www.linuxquestions.org/questi...aris-9-611910/
 
Old 01-09-2008, 03:35 AM   #3
deadlock
Member
 
Registered: Apr 2003
Distribution: Red Hat
Posts: 65

Original Poster
Rep: Reputation: 15
Unhappy

Thanks for that. I seem to be having some problems.

The dump seems to be OK using the dump described above, and also adding -b 256 to get better speeds from the LTO.

However, when I try the second mt command I get an error, similarly when I try to run restore.

Output as follows:

Code:
# dump -0u -b 256 -f /dev/nst0 /boot
  DUMP: Date of this level 0 dump: Wed Jan  9 09:27:07 2008
  DUMP: Dumping /dev/cciss/c0d0p1 (/boot) to /dev/nst0
  DUMP: Label: /boot
  DUMP: Writing 256 Kilobyte records
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 26847 blocks.
  DUMP: Volume 1 started with block 1 at: Wed Jan  9 09:27:07 2008
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
  DUMP: Closing /dev/nst0
  DUMP: Volume 1 completed at: Wed Jan  9 09:27:11 2008
  DUMP: Volume 1 26880 blocks (26.25MB)
  DUMP: Volume 1 took 0:00:04
  DUMP: Volume 1 transfer rate: 6720 kB/s
  DUMP: 26880 blocks (26.25MB) on 1 volume(s)
  DUMP: finished in 2 seconds, throughput 13440 kBytes/sec
  DUMP: Date of this level 0 dump: Wed Jan  9 09:27:07 2008
  DUMP: Date this dump completed:  Wed Jan  9 09:27:11 2008
  DUMP: Average transfer rate: 6720 kB/s
  DUMP: DUMP IS DONE

# mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=1, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x44 (no translation).
Soft error count since last status=0
General status bits on (81010000):
 EOF ONLINE IM_REP_EN

# mt -f /dev/nst0 fsf 1
/dev/nst0: Input/output error

#restore -b 256 -if /dev/nst0
restore: Tape read error on first record
 
Old 01-09-2008, 05:12 AM   #4
deadlock
Member
 
Registered: Apr 2003
Distribution: Red Hat
Posts: 65

Original Poster
Rep: Reputation: 15
OK managed to fix the mt problem. Needed to have the tape rewound. My Bad

Also managed to find a suggestion on using ssh to tunnel to the server hosting the tape drive for dump.

However, how do you define the password - seems to catch me in a loop when I try...
 
Old 01-09-2008, 06:35 AM   #5
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
Sounds like you're figuring things out.

Not sure how you are trying to do the password. Did you look at the other thread? It was intended using public key authentication for the ssh. You can find very good detailed documentation of how to do that at the following sites:

http://sial.org/howto/openssh/publickey-auth/

http://sourceforge.net/docman/displa...761&group_id=1

Having an actual password in a script and trying to get the password to be applied to the login is insecure and messy. With keys, you can also have restrictions specified in the private key portion that prevent misuse. For example, I use ssh public/private key combinations for the backup user amanda, and the private key portion only allows the amanda user from the specified computer to connect only to the amanda process using that public key. Pretty cool.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ultrium 2 - multi-tape error (DUMP: fopen on /dev/tty fails: No such device or addres tbwalter55 Linux - Hardware 2 01-08-2015 08:05 AM
dump restore: not found on tape remargorp Linux - Newbie 1 03-21-2007 07:47 PM
Reading the Contents of a Dump Tape kaplan71 Linux - General 2 11-08-2006 02:34 PM
dump restore: not found on tape eddi.b Linux - Newbie 1 02-05-2004 08:36 AM
"RAW" tape dump/read in Mandrake 9.2? Bob Ross Mandriva 2 01-21-2004 07:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration