LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-14-2003, 10:08 PM   #1
x2000koh
Member
 
Registered: Jul 2002
Location: singapore
Distribution: red had 7.2
Posts: 109

Rep: Reputation: 15
tape backup how to


Hi ! Linux Expert.
I am using redhat 7.2 and kernal2.4.19.
My tape is SONY Digital Data Storate Format DDS-3 (DGD125P)

I need help to solve my backup problem.

I insert a tape in my linux server. When I check the status it appear as follow.

[root@pluto root]# mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x25 (DDS-3).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN

I encounter the Input/output error When I do asf to forward to 3 file.

[root@pluto root]# mt -f /dev/nst0 asf 2
/dev/nst0: Input/output error

When I try to view the content of the backup tape it appear as follow.

[root@pluto root]# tar ztf /dev/nst0
tar (child): /dev/nst0: Cannot read: Input/output error
tar (child): At beginning of tape, quitting now
tar (child): Error is not recoverable: exiting now

gzip: stdin: unexpected end of file
tar: Child returned status 2
tar: Error exit delayed from previous errors


Appreciate if you can provide me your advise or assistant On how to make the tape backup working.

Regards,
x2000koh
 
Old 04-14-2003, 10:54 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,825

Rep: Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401
Are you positive that there is data on the tape already? How did you create the backup?
 
Old 04-15-2003, 12:31 AM   #3
x2000koh
Member
 
Registered: Jul 2002
Location: singapore
Distribution: red had 7.2
Posts: 109

Original Poster
Rep: Reputation: 15
MichaelK
Thanks for reply.
My backup script is as below.

---------------Start of backup script-------------
#!/bin/bash

# The General daily backup script

# This script performs a normal (not incremental) backup
# of user data on one or more machines.


# Change to /
cd /

# Variables
DIRS01="mnt/wall-d/Depts/Ammc \
mnt/wall-d/Depts/Acadonia \
mnt/wall-d/Depts/Agm\
mnt/wall-d/Depts/Accids \
mnt/wall-d/Depts/Accon \
mnt/wall-d/Depts/CFO-gm \
mnt/wall-d/Depts/CAdmin \
mnt/wall-d/Depts/EstMaint \
mnt/wall-d/Depts/EAud \
mnt/wall-d/Depts/Gorge \
mnt/wall-d/Depts/Harmmingbird \
mnt/wall-d/Depts/HR \
mnt/wall-d/Depts/IntBusDev \
mnt/wall-d/Depts/kim_seng \
mnt/wall-d/Depts/MgtTeam \
mnt/wall-d/Depts/MIS \
mnt/wall-d/Depts/MktgDept \
mnt/wall-d/AusDepts/OpGL \
mnt/wall-d/Depts/Public \
mnt/wall-d/Depts/Restricted \
mnt/wall-d/Depts/SuperAdm \
mnt/wall-d/Depts/USAMktg \
mnt/wall-d/Depts/CorpLit \
mnt/wall-d/Depts/EdGeaud"

# Rewind the tape
mt -f /dev/nst0 rewind

# Back up each directory in DIRS01
#for DIR in $DIRS01; do
# tar -zcvpf /dev/nst0 $DIR
# echo "$DIR backed up" >> /var/log/backup
#done

# Back up each directory in DIRS01
#for DIR in $DIRS01; do
# tar -zcvpf /dev/nst0 $DIR
# echo "$DIR backed up" >> /var/log/backup
#done

# Back up each directory in DIRS01
# Test on multiple archieve - Drop 'z' add 'M'
for DIR in $DIRS01; do
tar -cvpfM /dev/nst0 $DIR
echo &date
echo "$DIR backed up" >> /var/log/backup1
done

# Rewind & eject the tape
mt -f /dev/nst0 rewoffl
exit 0

----------End of backup script--------------
 
Old 04-15-2003, 08:58 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,825

Rep: Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401
Your not writing anything to tape. The first two loops in your backup script are commented out so even if you did you will have only one file on tape so thats why asf 2 also fails. Your verify command uses z uncompress option but your last backup loop does not use the z option

I don't think you want to use the -M multi volume option.
Also stick the leading / back in your directory list. It didn't work with out it on my system.

What does echo &date supposed to do? I think you want to add it to your backup up file. ie. echo data >>/var/log/backup1
and stick it before the loop starts
 
Old 01-25-2010, 03:04 AM   #5
jerry.p009
LQ Newbie
 
Registered: Jan 2010
Posts: 1

Rep: Reputation: 0
Have to check some other operating system because I am also using that tapes and it works fine on mac operating system.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tape backup triley Linux - General 2 08-31-2005 12:14 PM
Tape backup cbarbry Linux - Newbie 2 07-14-2004 06:07 AM
Tape incremental backup to different tape tungaw2001 Linux - Software 0 08-13-2003 10:42 PM
Tape backup help WorldBuilder Linux - Software 1 03-27-2003 02:26 PM
Which Tape backup? biggiefatts Linux - Hardware 4 02-19-2003 04:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration