Adapting the backup procedure described here to Microsoft Windows XP and Cygwin gives:
rsync -avz -e ssh backupapp@mywebsite.com:/var/www/website /home/myself/backup/website/
mkdir rsync
ssh-keygen -t dsa -b 1024 -f rsync/mirror-rsync-key
scp rsync/mirror-rsync-key.pub backupapp@mywebsite.com:/home/backupapp/
mkdir .ssh
chmod 700 .ssh
mv mirror-rsync-key.pub .ssh/.
cd .ssh/
touch authorized_keys
chmod 600 authorized_keys
cat mirror-rsync-key.pub >> authorized_keys
command="/home/backupapp/rsync/checkrsync",no-port-forwarding,no-X11-forwarding,no-pty
#!/bin/sh
case "$SSH_ORIGINAL_COMMAND" in
*\&*)
echo "Rejected"
;;
*\(*)
echo "Rejected"
;;
*\{*)
echo "Rejected"
;;
*\;*)
echo "Rejected"
;;
*\<*)
echo "Rejected"
;;
*\`*)
echo "Rejected"
;;
rsync\ --server*)
$SSH_ORIGINAL_COMMAND
;;
*)
echo "Rejected"
;;
esac
chmod 700 ~/rsync/checkrsync
$ cron-config
Do you want to install the cron daemon as a service? (yes/no) yes
Enter the value of CYGWIN for the daemon: [ ] ntsec
You must decide under what account the cron daemon will run.
If you are the only user on this machine, the daemon can run as yourself.
This gives access to all network drives but only allows you as user.
Otherwise cron should run under the local system account.
It will be capable of changing to other users without requiring a
password, using one of the three methods detailed in
http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1
Do you want the cron daemon to run as yourself? (yes/no) yes
Please enter the password for user 'localuser':
Reenter:
Running cron_diagnose ...
WARNING: You do not currently have a crontab file.
... no problem found.
Do you want to start the cron daemon as a service now? (yes/no) yes
OK. The cron daemon is now running.
In case of problem, examine the log file for cron,
/var/log/cron.log, and the Windows event log (using /usr/bin/cronevents)
for information about the problem cron is having.
Examine also any cron.log file in the HOME directory
(or the file specified in MAILTO) and cron related files in /tmp.
If you cannot fix the problem, then report it to cygwin@cygwin.com.
Please run the script /usr/bin/cronbug and ATTACH its output
(the file cronbug.txt) to your e-mail.
WARNING: PATH may be set differently under cron than in interactive shells.
Names such as "find" and "date" may refer to Windows programs.
export EDITOR=emacs
HOME=/home/localuser
PATH=/usr/local/bin:/usr/bin:/bin:$PATH
00 05 * * * /usr/bin/rsync -avz --delete -e "ssh -i rsync/mirror-rsync-key"
backupapp@mywebsite.com:/var/www/website/
/home/myself/backup/website/
* * * * * touch testfile