Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

Rep: Reputation: Disabled
Using CPIO for backup


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:
# Ensure that the device is valid
if [ ! -c "$TAPE" ] ; then
        echo "$TAPE is not a character device - ABORTING!"
        exit 1

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
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
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):
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 08:49 PM.
Old 08-21-2012, 11:14 PM   #2
Registered: Jan 2009
Location: /dev/ph
Distribution: Fedora, Ubuntu, Redhat, Centos
Posts: 299

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

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

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


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

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

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