If you're using a script to run rsync over ssh to backup files to another computer, and the script works from the command line but fails when run from cron, consider redirecting the script output to a text file for debugging:
rsync over ssh using cron fail
# This is your crontab file.
# To debug a misbehaving script, redirect stdout and stderr
# to a text file for examination.
# ....somescript.sh 2>&1 /home/user/somescript.debug
# Backup from workstation to fileserver.
# min hour(s) dom mon dow command
54 10,14,18,22 * * * /home/user/.cron/backup.sh
[Final bash script after debugging]
#!/bin/bash
# This is your backup.sh file, to be called via cron.
# Use rsync over ssh to backup files to the remote fileserver.
# Exclude those files and directories listed in the exclude-from file.
# The exclude file format is like this:
# Backup exclude file.
# We don't need to backup lots of files
# so we shall exclude them here.
# - .adobe
# - .bash_history
# - .bash_logout
# - .bash_profile
# - .bashrc
# - Music
# ...and so on.
# The backup command, in the format:
# executable options transport exclude source destination
/usr/bin/rsync -ave ssh --exclude-from=/home/user/.cron/rsync_client_exclude /home/user/ user@<remote ip address>:backup/
...you might find that you've been too liberal with your permissions on your public and private ssh keys. Ahh, the joys of switching linux distros and trying to get everything working again. It builds character! ;^)