Hello the interesting line in my crontab looks like this: (edited & saved it by running crontab -e)
23 * * * * rsync -av --delete [email protected]:/var/www/ /home/niklas >> /home/niklas/scripts/logfile
but .. this line does nothing (at the 24th minute no bandwidth is used, no output is in the logfile) can someone tell me what is wrong?
BTW: the authentification for the server works via a passwordless pgp key. that is why the user needs to be 'niklas'
EDIT:
ran type rsync
which returned /usr/bin/rsync
but that is already on the path:
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
EDIT2:
created /usr/bin/backup containing:
rsync -av --delete [email protected]:/var/www/ /home/niklas/server4you_www >> /home/niklas/scripts/logfile
chmod +x'ed it and changed the entry in chrontab to
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
16 * * * * /usr/bin/backup
still... its not working, though /var/log/syslog sais:
Aug 1 15:16:01 niklas-desktop CRON[9421]: (niklas) CMD (/usr/bin/backup)
please help
EDIT3:
Changing
rsync -av --delete [email protected]:/var/www/ /home/niklas/server4you_www >> /home/niklas/scripts/logfile
to
/usr/bin/rsync -av --delete [email protected]:/var/www/ /home/niklas/server4you_www >> /home/niklas/scripts/logfile
as expected does not alter the (unsatisfying) result. however `putting echo 'xyz' > log writes xyz into the log file
so... as you might guess... my issue is still not resolved.
adding a || echo "rsync died with error code $?"
to the backup script returned:
rsync died with error code 5
which as http://wpkg.org/Rsync_exit_codes suggests means "Error starting client-server protocol" so i guess something is fishy about ssh. again i am using a pgp key with a password but that password is by default unlocked by the keyring on startup so that i can ssh [email protected] without entering a password. Is it possible to send rsync the password of the ssh key?