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

Re: rsyncing via cron



on Wed, Sep 17, 2003 at 11:51:20AM +0200, Stefan Wolber (s.wolber@buettner-dryer.com) wrote:
> -----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.

This doesn't work for your cron job, which isn't a child of the
ssh-agent session, and doesn't know the socket address.

I'd recommend a forced command, running without a password.  The
alternative is to use a set of smeaphore files to indicate the location
of the ssh-agent socket.

This is a situation well covered in the O'Reilly SSH book.

Peace.

-- 
Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
    Hi! I'm a .signature virus. Copy me into
    your ~/.signature to help me spread!

Attachment: pgp3a1EwhAXBJ.pgp
Description: PGP signature


Reply to: