Operating System - HP-UX
1833784 Members
2357 Online
110063 Solutions
New Discussion

Re: replicating / syncing directories

 
Roberto Martinez_6
Frequent Advisor

replicating / syncing directories

Hi,
is there a faster way to sync directories or filesystems (copy/move all the data from one to another) than the famous
tar cf - * | (cd dest; tar xf)?
TIA
It wasn't me
10 REPLIES 10
Robert-Jan Goossens
Honored Contributor

Re: replicating / syncing directories

Hi,

# find /opt | cpio -pcmudv /otherrFS

Hope it helps,

Robert-Jan.
T G Manikandan
Honored Contributor

Re: replicating / syncing directories



#cd /home
#find . | cpio -pudlm /duphome


Thanks


John Palmer
Honored Contributor

Re: replicating / syncing directories

You could also user fbackup/frecover, example from man frecover to copy /usr to /mnt:

fbackup -i /usr -f - | (cd /mnt; frecover -Xrf -)

or even vxdump/vxrestore (assuming VXFS filesystems), similar example from man vxrestore:

vxdump 0f - /usr | (cd /mnt; vxrestore xf -)

Regards,
John
Balaji N
Honored Contributor

Re: replicating / syncing directories

check out rsync.
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Roberto Martinez_6
Frequent Advisor

Re: replicating / syncing directories

Thanks to all:

1. didn't find rsync on hpux.
2. tar: 5min20sec. cpio: 4min42sec. Great!

It wasn't me
Thomas Schler_1
Trusted Contributor

Re: replicating / syncing directories

Roberto:

If you really want to have sync'ed filesystems, then
install and use HP MirrorDisk/UX.

You will have one filesystem to access, but data are
mirrored, automatically. It is very fast, synchronization
is done in the background and on-line.

HP MirrorDisk/UX is not good for backups, but for hardware
failures (disks, SCSI controllers, cables, and so on).
no users -- no problems
Roberto Martinez_6
Frequent Advisor

Re: replicating / syncing directories

thanks, in fact what I wanted is to MOVE data across different disks.

It wasn't me
John Palmer
Honored Contributor

Re: replicating / syncing directories

From some testing that I've done, the vxdump/vxrestore method seems about the same speed as find/cpio. It also has the advantage that it supports largefiles where cpio doesn't.

Regards,
John
Balaji N
Honored Contributor

Re: replicating / syncing directories

u can find rsync here.
http://hpux.connect.org.uk/hppd/hpux/Networking/Admin/rsync-2.5.5/

-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Roberto Martinez_6
Frequent Advisor

Re: replicating / syncing directories

Thanx all.
It wasn't me