How to see files backed up on tape using dd command

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How to see files backed up on tape using dd command
# 1  
Old 01-31-2011
How to see files backed up on tape using dd command

Hi all,

I need some help...

- I have two servers - serverA and serverB.
- ServerB has a tape drive
- I took a backup of some files on serverB on to tape drive on serverA.
- I used the following command:

serverB> tar cvfb - 20 ./<file> | ssh <serverA> 'dd of=/dev/nst0 bs=20b'

- I repeated the same command for lots of other database files...
- Above works fine and gives no errors
- I went to serverA, which has tape drive, and rewind the tape, using

'mt -f /dev/nst0 rewind' commnd

- Now, I want to see contents on the tape but dont know how Smilie

- I thought tar tvf /dev/nst0 will do the trick but it gives input/output errors - there are no errors when files were copied to the tape.

- I now realise that command used to put files on tape was 'dd' and now I do not know how to display the contents of backup using dd command... I do not want to restore files to see if they backed up OK... I just want to see files are in the tape... I have 6TB of files to check Smilie

Any help from you will be appreciated.

Regards
Ahmerin
# 2  
Old 01-31-2011
Well, the first thing that strikes me is that you have set a block size in your backup (-b 20) that you have not set on your listing request. It may suggest that it is the deafult, but you never know it might just be that.

The other thing I would worry about is if you are writing to the no-rewind device. If not, then you may auto-rewind at the end of the write and the next will overwrite each time, to you will only have the last backup. It depends on your OS as to which is the non-rewind device. AIX would normally be /dev/rmt0.1, but that doesn't match your format so you would have to look at man rmt - or perhaps man nst in your case to see if it helps.

It may also be that the ssh is getting in the way and you may not be writing a valid archive in the first place. When I have done this sort of thing, I have shared the device as a whole and driven it directly from server B without the piped control.




Robin
Liverpool/Blackburn
UK
# 3  
Old 01-31-2011
Hi Robin,

Thanks for a prompt reply.

Everything worked fine, once I found where the problem was Smilie

Instead of using a backup software, I decided to work on the default unix utilities to control the tape library and device - mtx (for controlling the tape library/robotic arm; mt for the dive) and tar to do the backup. In doing so, I mixed the drive letter/number and the slot number from where the tape came from. My tape was in drive 1 and I was trying to read it from drive 0 Smilie .


Now all is fine (tar tvf /dev/nst0 is showing the contents) I am sorry to have taken so much of your's and others' time.

Regards
Ahmerin
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

how can i change inactive backed up filename on tsm

does any one know how to change inactive filename that is backed up on tsm? (1 Reply)
Discussion started by: curtis911
1 Replies

2. Solaris

files in tape

unix1{owadmin}% tar tvf /dev/rmt/1 -rw-rw-rw- 1021/10 0 Sep 11 17:54 2011 TinahPF_Far_32bit.segy tar: directory checksum error unix1{owadmin}% i know in this tape 3 files not only one file so what can i do to view 3 files and what is this error mean ( tar: directory checksum error... (2 Replies)
Discussion started by: ayman
2 Replies

3. UNIX for Dummies Questions & Answers

How to Identify date of file backed up used FBACKUP cmd?

Dear UNIX Experts, I'm a newbie. My name is Budi. I need some help from any body in this forum. How do we identify the backed up date of file in the Back up tape ? I did the back up using FBACKUP cmd. I tried to googling it, but unfortunately no aimed solution that I got. :confused: I've... (0 Replies)
Discussion started by: Bhoed
0 Replies

4. AIX

Tape status command

We sometime run backups to tape in the background using the cron. Is there a command that will show me how fast the information is being written and or how much data has been written? I know if we enter the information via the command prompt or smit it shows the speed and amount written. (2 Replies)
Discussion started by: daveisme
2 Replies

5. UNIX for Dummies Questions & Answers

Help recovering a backed up file

Hello, By accident I erased a file at work and I need to restore it from a backup tape. My manager says I will have to use the mt command with the fsf option to look through the tape but I am confuzed. I did a restore -t to get a listing of the tape. This is taking a long time. If I sound... (1 Reply)
Discussion started by: mojoman
1 Replies

6. Solaris

TAR command , listing backed up files

I've backed up several files to tape using tar, and wish to list those that have backed up. % tar cvf /dev/rmt/2un /s_1/oradata/pgpub/config.ora a /s_1/oradata/pgpub/config.ora 2 tape blocks But when I go to list the files: % tar tvf /dev/rmt/2un tar: tape read error What am I... (3 Replies)
Discussion started by: FredSmith
3 Replies

7. AIX

Echo Command to Tape

I've just got a new server running AIX5.3 When I Try this command: echo ABC123 > /dev/rmt0 I get the following message : A system call received a parameter that is not valid It worked OK on 4.3. Has something changed in the operating system> (0 Replies)
Discussion started by: gordbaby
0 Replies

8. Cybersecurity

Unix Backed up with Windows NT?

We are running a Windows NT environment and have a stand alone Unix box. Is there software that would allow this Unix machine to be backed up along with our routine Windows NT backups? Any suggestions would be appreciated. Thanks!!! (3 Replies)
Discussion started by: G-Money
3 Replies
Login or Register to Ask a Question