Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Attempting some rsyncs with the following template on the destination:

rsync --daemon --port=7000 --config=$REALLY_SIMPLE_FILE

and then running this on the src:

rsync -aHPv --port=7000 /some/directory dst::$CONFIG_NAME

is it possible to make rsync read the configuration file(on the dst) from stdin? or to pass it as some sort of string such that i dont have to actually write a file?

share|improve this question

It is not possible, because when running rsync as a daemon, it will fork a new process for every connection and every such process will read the config file again. In other words, even if the file is passed on STDIN and read by the parent process, the first child will have nothing to read.

Verify it yourself.

$ rsync --daemon --port=7000 --config=simplefile
$ cat simplefile
$ rsync  rsync://localhost:7000/
$ sed -i -e s/test1/test2/ simplefile
$ cat simplefile
$ rsync  rsync://localhost:7000/

You could make a named pipe and have a process write the config to it in a loop, but this is just as bad and arguably writing a file or writing to a fifo is the same thing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.