LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-21-2012, 07:46 PM   #1
Noewon
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Rep: Reputation: Disabled
Using CPIO for backup


Hi

There's supposed to be a nightly backup running which never returns any errors, so the boss assumed it's working fine.

The command inside the nightly script which runs the backup is:
Code:
TAPE=/dev/st0
# Ensure that the device is valid
if [ ! -c "$TAPE" ] ; then
        echo "$TAPE is not a character device - ABORTING!"
        exit 1
fi

find . -path './mnt' -prune -o -path './tmp' -prune -o -path './sys' -prune -o -path './proc' -prune -o -print | cpio -ocB >$TAPE 2>&1
when I try "cpio -t /dev/st0" I get nothing, the prompt just sits and after awhile, I abort out (ctrl-C)

cat /proc/scsi/scsi
Code:
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: ServeRA  Model: RAID1-Mirror     Rev: V1.0
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 03 Lun: 00
  Vendor: HP       Model: Ultrium 2-SCSI   Rev: S65D
  Type:   Sequential-Access                ANSI SCSI revision: 03
mt -f /dev/st0 status
Code:
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x42 (LTO-2).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN
how else can I check the contents of the tape and verify something is being written to the tape?

There is only one tape drive, how do I confirm /dev/st0 is the right device?

Last edited by Noewon; 08-21-2012 at 07:49 PM.
 
Old 08-21-2012, 10:14 PM   #2
fpmurphy
Member
 
Registered: Jan 2009
Location: /dev/ph
Distribution: Fedora, Ubuntu, Redhat, Centos
Posts: 299

Rep: Reputation: 62
Have you tried?
Code:
cpio -t < /dev/st0
 
1 members found this post helpful.
Old 08-21-2012, 11:37 PM   #3
Noewon
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks, this put me on the right path.

Code:
cpio -t < /dev/st0
gives me:
Code:
cpio: read error: Cannot allocate memory
which is fixed by:
Code:
cpio -tB < /dev/st0
 
  


Reply



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
Full Backup With Cpio! grim2 Linux - General 6 02-09-2012 06:43 AM
CPIO backup / configuration exactiv Linux - Software 3 05-25-2009 09:51 AM
CPIO Backup End of Media rma1 Other *NIX 3 10-30-2008 11:19 AM
Cannot fork after running CPIO backup sgamble2 Red Hat 1 10-28-2006 07:13 AM
Using cpio to backup to CDROM Cyberhund Linux - Newbie 3 07-21-2004 01:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:07 AM.

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