[comp.unix.microport] selective cpio restore

john@wa3wbu.UUCP (John Gayman) (10/03/88)

     I have been backing up by SV/AT 2.3 to tape for many months now. I
have had no problems restoring the system from scratch. What I needed
to do tonight was restore a bunch of files from the cpio backup. I 
couldnt get it to work. It would go through the whole tape like it
never got a match. What I was trying was:

    strm /dev/mt/rmt0 | cpio -icvmu /usr/acct/john/*

    What I wanted to do was restore all the files in the directory john.
Has anyone had any luck selectively restoring from cpio either tape
or floppy ?  Any hints are appreciated. Thanks.


					John


-- 
John Gayman, WA3WBU              |           UUCP: uunet!wa3wbu!john
1869 Valley Rd.                  |           ARPA: john@wa3wbu.uu.net 
Marysville, PA 17053             |           Packet: WA3WBU @ AK3P 

rsj@wa4mei.UUCP (Randy Jarrett WA4MEI) (10/03/88)

In article <644@wa3wbu.UUCP> john@wa3wbu.UUCP (John Gayman) writes:
>    strm /dev/mt/rmt0 | cpio -icvmu /usr/acct/john/*
>
>    What I wanted to do was restore all the files in the directory john.


    Try using the following.

    strm /dev/mt/rmt0 | cpio -icvmu "/usr/acct/john/*"

    It seems to work for me.

-- 
Randy Jarrett  WA4MEI 
UUCP  ...!gatech!wa4mei!rsj        | US SNAIL: P.O. Box 941217
PHONE +1 404 493 9017		   |           Atlanta, GA 30341-0217

jim@hcr.UUCP (Jim Sullivan) (10/05/88)

In article <1484@wa4mei.UUCP> rsj@wa4mei.UUCP (Randy Jarrett WA4MEI) writes:
>In article <644@wa3wbu.UUCP> john@wa3wbu.UUCP (John Gayman) writes:
>>    strm /dev/mt/rmt0 | cpio -icvmu /usr/acct/john/*
>>
>>    What I wanted to do was restore all the files in the directory john.
>    Try using the following.
>    strm /dev/mt/rmt0 | cpio -icvmu "/usr/acct/john/*"
>
of course, you could just escape the asterisk, and enter:

    strm /dev/mt/rmt0 | cpio -icvmu /usr/acct/john/\*

That's all Randy is doing by putting the string in quotes.  He's protecting
the string from the shell, which is going to try and expand the asterisk.