Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] rsync'ing in a script

----- Original Message -----
From: "David" <david@xxxxxxxxxxxxx>
To: <slug@xxxxxxxxxxx>
Sent: Tuesday, October 08, 2002 10:59 PM
Subject: [SLUG] rsync'ing in a script

> I want a script to automate file back-ups, and I've tried the following
> with no success:
> rsync -a -e ssh --password-file=file /etc me@elsewhere:/backup 2>
> /dev/null
> This works ok, except that it asks for a password on the command line.

I did something like this a while ago and as I recall it was a bit of a pain in
the neck but the final solution worked out somehting like this...
eval `/usr/local/bin/ssh-agent2`
echo "passphrase"| ssh-add2 -p pathtokey
rsync -vrzC --progress /path1
username@ipaddress:/path2 --rsh="/usr/local/bin/ssh2"

This mysteriously stopped working one day and I just created a new key without a
as I didn't have the time to work out why it died.

---Gareth Walters