Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cpio backup

Status
Not open for further replies.

rajeshbahl

IS-IT--Management
Jan 6, 2002
116
IN
We need to take cpio backup on our sco openserver 5.0.5 having tape drive to take the backup of another server running the same OS.

Can somebody suggest the procedure / syntax for the same ?


Thanks In Advance
Rajesh K. Bahl
 
find /filesystem -depth | cpio -ocvB -O /dev/rmt/0c does the trick for me. Annihilannic.
 
Sorry, put your tape device in the place of /dev/rmt/0c (I was in Solaris mode), probably /dev/rct0. Annihilannic.
 
find /filesystem -depth | cpio -ocvB -C 10240 -O /dev/rct0

and restore with

cpio -idvuk -I /dev/rct0 -C 10240

and read cpio -itv -I /dev/rct0

or you can take a level backup

find / -mtime -1 |cpio ..... =-=-=-=-=-=-=-=-=-=-=-=
Unix Systems Engineer
=-=-=-=-=-=-=-=-=-=-=-=
 
BUT THIS WILL TAKE THE BACKUP OF LOCAL SERVER ONLY. WHAT ABOUT THE REMOTE SERVER ?

RAJESH K. BAHL
 
Ah, missed the "another server" in the question.

Try setting up rsh permissions from the source server to the destination server, then use something like:

[tt]find /filesystem -depth -mount | cpio -ocvC32768 | rsh tapeserver "dd of=/dev/rct0 conv=bmode bs=32k"[/tt]

I have had problems with backups like this before though, so double-check that you can actually restore from the tape before you start to rely on it as a backup method. Annihilannic.
 
Using the -O switch as described on the man page, copied below, you should be able to, but only on a local tape drive.

[tt] -O file[, file ... ]
Direct the output of cpio to file. If file is a character-special
device, when the first medium is full, replace the medium and type
a carriage return to continue to the next medium. You can change
on directories that are being copied.[/tt]

Yes, it would back up everything except low level things like your partition tables, boot blocks, etc. Also it would put all of your mounted filesystems into one large archive, so in a recovery situation you might have to restore them selectively. Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top