Operating System - HP-UX
1833326 Members
3298 Online
110051 Solutions
New Discussion

Re: "Mirror" some directories of 1st disk into 2nd disk?

 
NDQ_1
Advisor

"Mirror" some directories of 1st disk into 2nd disk?

Hi all,
I'm newbie with HP-UX admin.

We have 2 workstations with HP-UX 11.00. In the 1st, we have some directories which contain working data. I would like to make a "copy" of some directories in the 1st workstation in the 2nd. So I'm looking for a program with cron job to copy updated files (not all files) from 1st to 2nd every night, it's possible ?
If yes, how to do that please ?

Thank you very much,
Regards,
NDQ
8 REPLIES 8
twang
Honored Contributor

Re: "Mirror" some directories of 1st disk into 2nd disk?

If you have Mirror/UX installed, you can mirror LVs on a VG into another VG:

1)
# lvextend -m 1 /dev/vg03/lvol12 /dev/dsk/c5t2d0
# lvextend -m 1 /dev/vg03/lvol13 /dev/dsk/c5t2d0

2) vgcfgbackup /dev/vg03
Massimo Bianchi
Honored Contributor

Re: "Mirror" some directories of 1st disk into 2nd disk?

Hi,
i suggest you to use rsync, a free enhancement of rcp, that can do incremental copy, and is very fast.

Free download at
http://hpux.connect.org.uk/

and very easily scriptable. Must ne installed on both nodes, but it wortch it.


HTH,
Massimo
twang
Honored Contributor

Re: "Mirror" some directories of 1st disk into 2nd disk?

Sorry for wrong explanation, I mean that we can use "lvextend" to mirror a LV on disk1 into disk2, both disk1 and disk2 already belonged to the sam VG.
No point please!
Massimo Bianchi
Honored Contributor

Re: "Mirror" some directories of 1st disk into 2nd disk?

Hi,
if you wuold go with rsync, here is an example of the sintax:

on DEST_SERVER
# cd /new/destination/directory
# /tmp/rsync64 -azvHgDSx --rsync-path=/tmp/rsync64 -P
IP.OF.OTHER.SERVER:$PWD/. .


I specified /tmp/rsync64 because that was the path in which the executable was put, and was built ad hoc.

Massimo


jim bidebo
Regular Advisor

Re: "Mirror" some directories of 1st disk into 2nd disk?

Another option would be to use NFS.
It would probably be the easiest way.

man exports (for how to configure the sharing)

I would recomend find and cpio for the copy part.

(example on how it could look : find /source -print |cpio -pdumv /destination)

man find
man cpio

and you will probably need to learn som basic scripting.

man ksh or sh

and offcource how to use crontab:

man crontab

happy reading =)
NDQ_1
Advisor

Re: "Mirror" some directories of 1st disk into 2nd disk?

Hi Massimo,
I'll try your sugguestion.
Thanks,
NDQ
Jean-Louis Phelix
Honored Contributor

Re: "Mirror" some directories of 1st disk into 2nd disk?

Hi,

You also have a "standard" powerfull tool to do it on all HP-UX systems : rdist. Have a look to the man pages.

Regards.
It works for me (© Bill McNAMARA ...)
Tim D Fulford
Honored Contributor

Re: "Mirror" some directories of 1st disk into 2nd disk?

comming in late.....

rsync is OK (but I could not get it to work using port method but it was fine using rcp)

How about a cron job using the following...

On target mc
# cd ; remsh "cd | gzip -" | gunzip - | tar xf -

What it does is tar, gzip, gunzip & untar the info in one go over the network. It is no less secure than rsync as you need equivalences for both (though you can use ssh for rsync)

Regards

Tim
-