Operating System - HP-UX
1832506 Members
4681 Online
110043 Solutions
New Discussion

Restoring DDS tape backup to specific directory

 
SOLVED
Go to solution
Colleen Wolfe
New Member

Restoring DDS tape backup to specific directory

I have a cpio created backup on DDS (created from a 10.20). I am trying to restore all the files and directory structure from the DDS tape to a specific directory on my platform (which is an 11.0).

I have tried the following:

1. find /dev/rmt/0m -depth -print | cpio -pvdu /oldsys

2. cpio -itB /dev/rmt/0m | cpio -pvdu /oldsys

3. chroot /oldsys cpio -iBvdu < /dev/rmt/0m

Number 1 above will not find anything on /dev/rmt/0m.

Number 2, the first cpio string when done by itself, "cpio -itB /dev/rmt/0m" will list out the files from the tape, but when i add the piped cpio, "cpio -pvdu /oldsys" it says it can't find any of the files on the tape. It appears to be looking at the output from cpio -itB and trying to find it on my platform to copy rather then copying it from the tape.

Number 3 above says it can't find cpio. so i then create a /oldsys/bin and copy /bin/cpio to /oldsys/bin/cpio and it still fails.

Is my syntax all wrong? Is there a better way to extract the tape contents?

Thank you for your time and help.
Colleen Wolfe
5 REPLIES 5
Uday_S_Ankolekar
Honored Contributor

Re: Restoring DDS tape backup to specific directory


Hi,

Read this doc for Restoring cpio archive files to a absolute path.

http://us-support2.external.hp.com/cki/bin/doc.pl/sid=231828321643852829/screen=ckiDisplayDocument?docId=200000006380242

-USA..
Good Luck..
Uday_S_Ankolekar
Honored Contributor
Solution

Re: Restoring DDS tape backup to specific directory

Helen French
Honored Contributor

Re: Restoring DDS tape backup to specific directory

hey,

U must use a wildcard to specify the filenames !

eg:
# find /data -depth -print | cpio -ovB > /dev/rmt/0m (for backup)
# cpio -iuvB /data/data1/* < /dev/rmt/0m

HTH,
Shiju
Life is a promise, fulfill it!
Sanjay_6
Honored Contributor

Re: Restoring DDS tape backup to specific directory

Colleen Wolfe
New Member

Re: Restoring DDS tape backup to specific directory

The tape has absolute paths, so i don't think using the wildcard will work. So i tried the chrooting option. This is what i did:

1. made the following directories
/opt/oldsys
/opt/oldsys/bin
/opt/oldsys/bin/usr
/opt/oldsys/bin/lib
/opt/oldsys/dev
/opt/oldsys/dev/rmt
/opt/oldsys/usr

2. copied the following files to the appropriate oldsys directory:
/bin/sh
/usr/bin/cpio
/usr/bin/tpio
/usr/lib/dld.sl
/usr/lib/libc.2
/usr/lib/libdld.2

3. created copy of my tape drive:
mknod 0m c 205 0x033000

4. i cd'd to /opt/oldsys, then tried to run the following:
chroot /opt/oldsys /bin/sh

I recieved the following error:
# tcio -i /dev/rmt/0m | cpio -iBvdu
tcio(1013): cannot set tape options /dev/rmt/0m; errno 22
Can't open /dev/tty to prompt for more media.

So then i tried just to run
# cpio -iBvdu < /dev/rmt/0m

And this worked great!
Thanks so much.
Colleen Wolfe