user2134226 user2134226 - 4 months ago 23
Linux Question

Running rsync in background

I use this to run rsync in background

rsync -avh /home/abc/abac /backups/ddd &


When i do that i see line saying 1 process stopped.

Now does that mean my process is still running ot it is stopped

Answer

It is probably trying to read from the terminal (to ask you for a password, perhaps). When a background process tries to read from the terminal, it gets stopped.

You can make the error go away by redirecting stdin from /dev/null:

rsync -avh /home/abc/abac /backups/ddd < /dev/null &

...but then it will probably fail because it will not be able to read whatever it was trying to read.

Comments