1838192 Members
3810 Online
110125 Solutions
New Discussion

cpio to remote tapedrive

 
SOLVED
Go to solution
DECOSTER
Occasional Contributor

cpio to remote tapedrive

Does anyone know a way to backup data using cpio to a remote tapedrive (or remote file) ?

with tar I know how to redirect ( tar cvf - /|remsh hostname 'dd of= ... bs=10k', but does something similar exist for cpio ?
4 REPLIES 4
Shahul
Esteemed Contributor

Re: cpio to remote tapedrive


Hi

I think this is the easyest way.
Go to a machine where Dat drive is connected physically. Before that export ur file system which U want to backup. Then mount it on the machine which is having dat drive. Then take backup from there.

Procedure

Suppose ur data is in HP1 and dat drive is in HP2. Suppose U want to take backup of usr.

From HP1

#exportfs -i /usr -root=HP2

From HP2

#mkdir /mybackup
#mount HP1:/usr /mybackup
#cd /mybackup
#find . -depth -print | cpio -xm /dev/rmt/0mn


I hope this will be helpfull to U.


Best of luck
Shahul
DECOSTER
Occasional Contributor

Re: cpio to remote tapedrive

It would indeed help me, if only NFS-links between the 2 systems were allowed ...
Herve BRANGIER
Respected Contributor
Solution

Re: cpio to remote tapedrive

Hi,

A command like (on machine without tape drive):
find . -depth -xdev | cpio -ovxcB 2>/tmp/err.cpio |remsh hostwithtapedrive -l user "cat - | dd of=/dev/rmt/0m obs=5k"

User must access hostwittape without passwd
(add it on .rhost of this host).

Reply to this kind of questions are one this
forum ... make a search for more informations.

HTH

Herve


Volker Borowski
Honored Contributor

Re: cpio to remote tapedrive

Hi,

as stated, it should work the same with cpio as like tar.

I just like to recommend in addition, to set the blocksize of the dd writing to the tape to the same, that you would use to write with cpio.

I.e. a cpio -ovB should be piped to a dd with obs=5120 bytes.

In this case, you can move the tape to another host an read directly with the coresponding cpio - read command.

Otherwise, you might have to adjust the blocksize or read through dd to a pipe first upon recovery.

Volker