Originally Posted by
papibe
It would allow you to connect to the terminal where the command it is actually being executed.
IMHO, this is very helpful when you are rsyncing a few big files, instead of several small to medium files. In this case the option --progress make more sense than -v.
I personally use a combination of screen and rsync to share family photos and videos with my brother.
Inside cron you need to create a detached screen:
Code:
screen -dmS NameOfScreen your_rsync_script.sh
At any time you can check if there are screens actives by doing:
If you see something like this:
Code:
There is a screen on:
3637.NameOfScreen (02/12/2012 08:31:02 PM) (Detached)
1 Socket in /var/run/screen/S-user.
it means that the script is still running inside the screen named 'NameOfScreen'. In order to attach (connect) to the virtual screen do this:
Code:
screen -r NameOfScreen
To leave things running as they were, de attach from the screen by pressing Ctrl+a d (control a, and then d).
Hope it helps.
Regards.
The script looks like this
Code:
#!/bin/bash
cmd="rsync -avzhP --verbose --log-file=/data/server-rsync-log --owner=david --group=admin --chmod=a+rw,g+rw,g+rw,o-wx /data/server-remote/ /data/server-local/"
eval $cmd # execute command
The problem is, when I run
Code:
screen -dmS rsync -avzhP --verbose --log-file=/data/server-rsync-log --owner=david --group=admin --chmod=a+rw,g+rw,g+rw,o-wx /data/server-remote/ /data/server-local/
I get this
Code:
Screen version 4.00.03jw4 (FAU) 2-May-06
So I thought I had to run it like this
Code:
screen -dmS /usr/bin/ssh-server-rsync
but when I do, I get this
Code:
Must run suid root for multiuser support.
What am I doing wrong?
Bookmarks