cancel
Showing results for 
Search instead for 
Did you mean: 

Configurate rsync on HP-UX 11.31

IvanPacheco
Occasional Visitor

Configurate rsync on HP-UX 11.31

Como sincronizar directorios de HP-UX 11.31 con Windows XP.

Contamos con el programa cwRsync en Windows.
Y la versión rsync 3.0.6 bajo HP-UX


How to synchronize directories HP-UX 11.31 with Windows XP.

We have install cwRsync program in Windows.
And rsync version 3.0.6 on HP-UX.


Urrrrg. SOS. Help

4 REPLIES
Matti_Kurkela
Honored Contributor

Re: Configurate rsync on HP-UX 11.31

From the cwRsync web page:

"Rsync normally uses ssh for communication. It requires no special privileges for installation. You must, however, have a working ssh system. "

http://www.itefix.no/i2/node/10650

(cwRsync is a compact installation package which includes Cygwin rsync and openSSH for Windows)

So the SSH for the Windows side is covered by the cwRsync package itself, but you need a SSH system at the HP-UX side too. Fortunately, HP offers one for free: go to http://software.hp.com and search for "HP-UX Secure Shell".

You *really* should read the rsync documentation, it contains very nice examples:
http://rsync.samba.org/documentation.html

Make sure the sshd daemon is running on the HP-UX system before going forward. For some reason, HP has chosen a non-obvious name for its start-up script:

sh /sbin/init.d/secsh start

At this point, you should be able to use a command like this on the Windows side to copy things to HP-UX side:

cd \windowsdir
rsync -avz targetdir hpuxserver:/hpuxdir

The example above would copy a Windows directory \windowsdir\targetdir to /hpuxdir/targetdir on server named hpuxserver. If /hpuxdir/targetdir already exists, rsync will automatically check what's in it and will transfer only the files necessary to bring the /hpuxdir/targetdir up to date with the Windows version.

You can also use rsync to "pull" files and directories to your local system from a remote one. Again, example command for the Windows system:

cd \windowsdir
rsync -avz hpuxserver:/hpuxdir/targetdir .
(NOTE: the single dot "." means "to the current local directory")

To be able to push&pull files between the servers by entering rsync commands to the HP-UX system, you must enable either the OpenSSH service or the rsync server service on the Windows server. To use the rsync server, you must first write a configuration file for it: please read the rsync documentation for that.

When using the rsync server service, you must use two colons after the name of the remote host, for example:

cd /hpuxdir
rsync targetdir windowsserver::/windowsdir

(NOTE: the Windows standard path separator is the backslash "\", which is troublesome in Unix shells because it is used as a special escape character: you would have to write two backslashes "\\" instead of one. Fortunately, Cygwin allows the use of a forward slash instead of backslash.)

MK
MK
IvanPacheco
Occasional Visitor

Re: Configurate rsync on HP-UX 11.31

Finalmente hemos podido syncronizar archivos desde HP-UX a Windows. Ahora el inconveniente es como mantener el formato de ASCII en archivos de texto. Ya que al editar un archivo de texto transferidos aparece un cuadrado al final de cada linea, uniendolas en una sola linea.

Finally we were able to syncronize files from HP-UX to Windows. Now the problem is how to keep the format of ASCII text files. Since when editing a text file transferred a square appears at the end of each line, uniting them into one line.
Matti_Kurkela
Honored Contributor

Re: Configurate rsync on HP-UX 11.31

Windows and HP-UX use different end-of-line characters in text files: Windows (like DOS that came before it) uses ASCII CR+LF, HP-UX (like most Unix systems) uses LF only.

HP-UX already includes tools for this conversion: the commands dos2ux and ux2dos will convert the end-of-line characters.

Before sending a Unix text file to the Windows system, run "ux2dos filename.txt" to convert it to the DOS/Windows format.

If you have a file that is in Windows format, and you wish to edit it in HP-UX, run "dos2ux filename.txt" to convert it to Unix format first.

Some Unix editors, like vim and emacs, can also edit Windows-formatted text files directly when an appropriate mode is selected. There are also text editors for Windows which can handle Unix-formatted files: for example, "metapad:
http://liquidninja.com/metapad/

MK
MK
IvanPacheco
Occasional Visitor

Re: Configurate rsync on HP-UX 11.31

Gracias. Se aplico el comando ux2dos para todos archivos en el directorio requerido de HP-UX de esta forma: ux2dos *.txt
Como resultado tomo bastante tiempo su ejecución. Luego se realizo la sincronización y del lado de windows continua con el mismo problema al final de cada linea aparece el cuadrado y une las lineas en los archivos de texto.

Existe alguna otra opción????? O a su vez existe alguna sentencia que se pueda añadir al script del cwRsync y sincronizar en modo ASCII como en FTP.




Thank you. Ux2dos command was applied for all required files in the HP-UX this: ux2dos *. txt
As a result took a long time execution. Then you synchronize windows side and continuing with the same problem at the end of each line shows the square and joined the lines in the text files.

Is there any other option ????? Or turn there is a sentence that can be added to the script and synchronize cwRsync ASCII mode FTP.