restore tape created with multiple cpio commands

restore tape created with multiple cpio commands

Post by Steven Rainwat » Fri, 25 Apr 1997 04:00:00



After searching both man pages and related FAQ's I couldn't find an answer
to this problem.

We have a tape backup created on our Solaris machine using a series of
3 cpio commands like so:

find . -name <file group 1> -print | cpio -o -V > /dev/rmt/0
find . -name <file group 2> -print | cpio -o -V > /dev/rmt/0
find . -name <file group 3> -print | cpio -o -V > /dev/rmt/0

When we use cpio to list the files or attempt a restore operation only
files from the first of the three commands are visible. We have been
unable to list or restore files from the second or third of the commands.

My question is: what happened to the second and third group of files (no
error messages appeared and they seemed to go onto the tape) and how the
heck do I restore them??

Any help (or advice on a better way to backup mutliple groups of files) is
appreciated!

-Steve

 ----------------------------------------------------------------------------

| Web     http://www.ncc.com/index.html | be sure to avoid electrodes in     |
| Tel 972-650-2002   Fax 972-650-1929   | your path"          -Robotron 2084 |
 ----------------------------------------------------------------------------

 
 
 

restore tape created with multiple cpio commands

Post by Robert Yun » Fri, 25 Apr 1997 04:00:00


You are overwritten data with each commands since you are using a
rewinding device.  Use these instead:

 find . -name <file group 1> -print | cpio -o -V > /dev/rmt/0n
 find . -name <file group 2> -print | cpio -o -V > /dev/rmt/0n
 find . -name <file group 3> -print | cpio -o -V > /dev/rmt/0

With /dev/rmt/0n, the tape will not be rewind after each command except
for the last one.


> After searching both man pages and related FAQ's I couldn't find an answer
> to this problem.

> We have a tape backup created on our Solaris machine using a series of
> 3 cpio commands like so:

> find . -name <file group 1> -print | cpio -o -V > /dev/rmt/0
> find . -name <file group 2> -print | cpio -o -V > /dev/rmt/0
> find . -name <file group 3> -print | cpio -o -V > /dev/rmt/0

> When we use cpio to list the files or attempt a restore operation only
> files from the first of the three commands are visible. We have been
> unable to list or restore files from the second or third of the commands.

> My question is: what happened to the second and third group of files (no
> error messages appeared and they seemed to go onto the tape) and how the
> heck do I restore them??

> Any help (or advice on a better way to backup mutliple groups of files) is
> appreciated!

> -Steve

>  ----------------------------------------------------------------------------

> | Web     http://www.ncc.com/index.html | be sure to avoid electrodes in     |
> | Tel 972-650-2002   Fax 972-650-1929   | your path"          -Robotron 2084 |
>  ----------------------------------------------------------------------------

--

Robert Yung


 
 
 

restore tape created with multiple cpio commands

Post by Laurence Lindstro » Sat, 26 Apr 1997 04:00:00


               <Snip>

Quote:> We have a tape backup created on our Solaris machine using a series of
> 3 cpio commands like so:

> find . -name <file group 1> -print | cpio -o -V > /dev/rmt/0
> find . -name <file group 2> -print | cpio -o -V > /dev/rmt/0
> find . -name <file group 3> -print | cpio -o -V > /dev/rmt/0

> When we use cpio to list the files or attempt a restore operation only
> files from the first of the three commands are visible. We have been
> unable to list or restore files from the second or third of the commands.

> My question is: what happened to the second and third group of files (no
> error messages appeared and they seemed to go onto the tape) and how the
> heck do I restore them??

                 <Snip>

   The device driver /dev/rmt/0 rewinds the tape after each
operation.  I would expect that the third group is on the tape,
and it's the first and second that are missing.  Try /dev/rmt/0n.  
I also use cpio for backing up selected files, like all of those
in my account.  For full file system backup, The experts in this
group will tell you to use ufsdump and ufsrestore instead of cpio.  

   I would bracket any operation with the following command:

      mt -f /dev/rmt/0 rew

   If you don't like to type, I think you can do the same thing
by making the last operation to /dev/rmt/0.  

   I have a document describing tape backup, step by step.  Drop
me E-mail if you want a copy.  

                                                       Larry

 
 
 

restore tape created with multiple cpio commands

Post by Griff Mill » Wed, 30 Apr 1997 04:00:00




>After searching both man pages and related FAQ's I couldn't find an answer
>to this problem.

>We have a tape backup created on our Solaris machine using a series of
>3 cpio commands like so:

>find . -name <file group 1> -print | cpio -o -V > /dev/rmt/0
>find . -name <file group 2> -print | cpio -o -V > /dev/rmt/0
>find . -name <file group 3> -print | cpio -o -V > /dev/rmt/0

You should have used the no-rewind device, '/dev/rmt/0n'. As it is,
your first cpio went to tape, then the tape drive rewound the tape.
Then your 2nd cpio went to tape (over the first) then the tape
drive rewound the tape. And so on.

Once you get a backup that was created properly, you would
also use the no-rewind device to access anything other than the
first cpio on it.

See the following manpages:

st(7d)
mt(1)

--
Griff Miller                              "I don't even put bumperstickers on
Senior Unix Sysadmin   '85 VF1100S         my car; why would I get a tattoo?"
PGS Tensor             '95 Z-28 6 spd.

 
 
 

1. Ack!! cpio restore command!!!

Hi, I've been playing around with cpio to do some backups on directories.
Anyway, the problem is, I'm finding it REALLY hard to restore just ONE file
to somewhere.

Say I want to restore the file "mksysb.backup" from my test.cpio archive.
I've tried:

cpio -im "mksysb.backup" <test.cpio
cpio -im mksysb.backup <test.cpio
cpio -im `mksysb.backuo` <test.cpio

None of these work, but if I just let restore the whole archive, and give
errors on the "same or newer" files it finds, it'll restore it just fine, so
the

cpio -i <test.cpio

command works, but throws tons of messages on the screen, and it's certainly
not the right way to restore ONE file right??  What am I missing?

Thanks,

Matt Stevenson
PLEASE EMAIL REPLIES! :)

2. Tape drive on || port

3. Need help with command syntax for performing a remote cpio restore

4. cdrecord - Need help urgently

5. Different tape devices prevent cpio restore

6. User root has been deleted!

7. cpio : Restoring Root from backup tape

8. how to execute program when mail is comming?

9. REQ: Suitable cpio command to create full system backup

10. How do I see the content of a tape (created using cpio)?

11. Can I read a cpio tape created on a Sun SparcServer?!

12. Backup onto multiple tapes with cpio

13. OFF TOPIC: What is the command to backup a hard disk to DAT tape using cpio?