Can rsync write to a FIFO?

Robin Lee Powell robinleepowell at gmail.com
Sat Feb 11 18:43:14 UTC 2023


Yeah, I was thinking tar, but it's effectively the same thing.

On Sat, Feb 11, 2023 at 07:14:57PM +0100, Hardy via rsync wrote:
> If this helps, in old days I used to use cpio for a similar thing.
> 
> I do not want to spam you with my whole script, but willing to share if you want. I think you will get the hang of it by the following snippet. (Get yourself man-knowledge about the -i -o -p mechanism of cpio and the use of dd.) This was in the good (?) old days when rsh worked as simple (and insecure) as this. In modern *n*x like systems rsh is a link to ssh, which is (besides being entirely wrong!) a pitfall to finding correct cli arguments. But it is manageable if you are aware of it.
> 
> CPIOP = parameter arguments to cpio
> /tmp/$$.f = list of files
> 
> Snippet:
> 
> case $CPIOP in
>   -i*) rsh -l $RUSER $RHOST dd if=$RDEV | cpio $CPIOP
>         ;;
>   -o*)
>         cpio $CPIOP </tmp/$$.f | rsh -l $RUSER $RHOST dd of=$RDEV
>         ;;
>   -p)
>         cpio -ocv </tmp/$$.f | rsh -l $RUSER $RHOST cpio -icmd
>         ;;
>   *)	echo argument mismatch $CPIOP >&2
> 	exit
> 	;;
> esac
> 
> Hope this gives an idea
> 
> Hardy
> 
> Am 10.02.23 um 10:31 schrieb Chris Green via rsync:
> > I have searched a little and read the man page but I can't really find
> > a good definite answer to this.
> > 
> > Can rsync write to a FIFO?  Obviously one needs the --inplace to do
> > this, does one also need --write-devices?
> > 
> > It would be very handy if one can do this, to use as a simple message
> > passing mechanism.  Write something to a file on system A and rsync it
> > to a FIFO on system B where there is a simple script reading the FIFO.
> > The script gets the contents of the file every time it's written.
> > 
> > (this is all within a LAN behind a reasonably secure firewall)
> > 
> 
> -- 
> Please use reply-all for most replies to avoid omitting the mailing list.
> To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html



More information about the rsync mailing list