Operating System - HP-UX
1833324 Members
3152 Online
110051 Solutions
New Discussion

copy socket over remsh???

 
Tony Kuehn
Advisor

copy socket over remsh???

I am trying to copy the contents of a directory to another hosts. In the directory there are sockets that I want to copy as well. I have tried using fbackup to copy this, however, the frecover does not recover the socket file. Currently, I am experimenting with cpio using the -x option but still have not had any success. Here is the command that I am using find . -depth -xdev |cpio -oBmudxvl | remsh 'cd /tmp; cpio -iBmudxvl'
Please advise any suggestions to copy socket files to a different host. Thanks.
5 REPLIES 5
S.K. Chan
Honored Contributor

Re: copy socket over remsh???

Looks like syntax to me .. using the example you gave, try this instead ..
# (find . -depth -xdev |cpio -oBmudxvl) | remsh "cd /tmp; cpio -iBmudxvl"
The "(" and ")" I think is critical, having single or double quotes would not matter I think.
The syntax I've always used to cpio across different systems is this ..
# (find -xdev|cpio -coax) | remsh ;cpio -icdmuxla"
Carlos Fernandez Riera
Honored Contributor

Re: copy socket over remsh???

You dont need to copy sockets.
Sockets files will be created by programs as they need.
unsupported
Volker Borowski
Honored Contributor

Re: copy socket over remsh???

Hi,

to be honest, I never dealt with sockets directly, but ....

What about transfering files, directories and links as you described, and do the sockets in a second run like

find . -type s -exec remsh_sript_that_creates_socket {} \;

... in which you put in what creates your socket ?

Volker

P.S.
BTW, I would not mind, if someone gives me a hint how those are created. Google return a hell of references what to do if "mySQL" connot create it's socket, but it did not tell what to do if I ca not :-)
Tony Kuehn
Advisor

Re: copy socket over remsh???

S.K. - I tried your suggestions, however, I still get the error "socket not backed up".

Carlos - Thats what I thought, however, I have not been able to get the application to start without this socket

Volker - I am not sure how the application creates the socket else that would be a very good idea.
Tony Kuehn
Advisor

Re: copy socket over remsh???

Looking at the user id that runs the application found it's shell is set to /bin/false. I gave this a valid shell and application started and the socket was created. Thanks for all your suggestions.