[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

rsyncing via cron



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

I would like to backup my computer with rsync regulary with cron to a linux 
server. Both computer are running with debian.

I am using the following script:

#! /bin/sh
umount /mnt/daten
rsync -bazv -e ssh --backup-dir=/mnt/data/skeeve/backup_wolber /home/wolber/
root@192.168.0.2:/mnt/data/skeeve/home
mount /mnt/daten

The sshkey requires a password but I use ssh-add to activate the key. The key 
is also at the server.

If I am running the script from the shell everything is fine and it saves any 
changes to the server.

If cron is running it by the following line in cronttab:

18 9    * * 1-5 wolber /usr/local/bin/backup_daten

it generates the following output:

Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password,keyboard-interactive).
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(165)

How can I get it to run?

Thanks a lot.


Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/aC6l/txsUUbA04MRApMAAKDKyAu876ETSwwGwovrOh/dVSlBRwCgmp1O
5WhlFlJ2EDFd6MUUMPjhflI=
=6k9M
-----END PGP SIGNATURE-----



Reply to: