LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Check tape dump (https://www.linuxquestions.org/questions/linux-hardware-18/check-tape-dump-611971/)

deadlock 01-08-2008 07:19 AM

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

choogendyk 01-08-2008 07:53 PM

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/

deadlock 01-09-2008 03:35 AM

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


deadlock 01-09-2008 05:12 AM

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...

choogendyk 01-09-2008 06:35 AM

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.


All times are GMT -5. The time now is 03:55 AM.